Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Delete Duplicate Emails

Write a DELETE statement that removes duplicate emails from the Person table, keeping only the row with the smallest id for each email.

Table schema

Person(id INT PRIMARY KEY, email VARCHAR(100))

Sample data

id | email
1 | a@x.com
2 | b@x.com
3 | a@x.com

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.