문제
풀이
- write an sql query to delete all the duplicate emails, keeping only one unique email with the smallest id.
- return the result table in any order.
- the query result format is in the following example.
코드
DELETE T1
FROM Person T1, Person T2
WHERE T1.Email = T2.Email AND T1.Id > T2.Id
결과
출처 && 깃허브
leetcode
github