原题leetcode,数据库常用操作去重,思路就是按照email列相同合并后(其实这时候已经去重了)取出ID,从person中删除不存在ID
# Select 嵌套使用临时表时,需要为临时表指定别名 a。
# group 默认不会选择最大最小ID,只会选择行靠前的ID
delete
from person
where Id not in
(select * from (select min(Id) from person group by Email)as a)
DELETE p from Person p, Person q where p.Id>q.Id AND q.Email=p.Email