0196. Delete Duplicate Emails
Description
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| Id | int |
| Email | varchar |
+-------------+---------+
Id is the primary key column for this table.
Each row of this table contains an email. The emails will not contain uppercase letters.**Input:**
Person table:
+----+------------------+
| Id | Email |
+----+------------------+
| 1 | john@example.com |
| 2 | bob@example.com |
| 3 | john@example.com |
+----+------------------+
**Output:**
+----+------------------+
| Id | Email |
+----+------------------+
| 1 | john@example.com |
| 2 | bob@example.com |
+----+------------------+
**Explanation:** john@example.com is repeated two times. We keep the row with the smallest Id = 1.ac
Last updated