Remove duplicate email records so that only one row remains for each unique email address.
You are given a table of email records. Some email addresses appear in multiple rows. Your task is to remove the duplicate rows so that each email address appears at most once.
When multiple rows share the same email address, keep one row and delete the rest. The exact row to keep is typically the one chosen by the problem's rule (for example, the lowest id or any one row if no tie-break is specified).
Return the cleaned result or the delete action required, depending on the SQL variant of the task.
Produce a solution that identifies duplicate email values efficiently and removes or filters them correctly.
id column and an email column.email value.email.Example 1
Input
id | email 1 | a@b.com 2 | c@d.com 3 | a@b.com
Output
id | email 1 | a@b.com 2 | c@d.com
Explanation
The email a@b.com appears twice, so one of the duplicate rows is removed and only a single row for that email remains.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.