https://leetcode-cn.com/problems/delete-duplicate-emails/
编写一个 SQL 查询,来删除 Person 表中所有重复的电子邮箱,重复的邮箱里只保留 Id 最小 的那个。
{"headers": {"Person": ["Id", "Email"]}, "rows": {"Person": [[1, "john@example.com"], [2, "bob@example.com"], [3, "john@example.com"]]}}
delete a
from Person a,
Person b where a.Email=b.Email and a.id>b.id