Delete Duplicate Emails
Task: Write a solution to DELETE all duplicate emails, keeping only one unique email with the smallest id. NOTE: return SELECT * FROM Person to verify.
Table: Person
+-------------+--------------+
| Column Name | Type |
+-------------+--------------+
| id | INT |
| email | varchar(255) |
+-------------+--------------+
Input: Person table:
+----+------------------+
| id | email |
+----+------------------+
| 1 | john@example.com |
| 2 | bob@example.com |
| 3 | john@example.com |
+----+------------------+
Output:
+----+------------------+
| id | email |
+----+------------------+
| 2 | bob@example.com |
| 1 | john@example.com |
+----+------------------+