09-30(删除重复邮箱-mysql)
2020-11-19 本文已影响0人
冰菓_
image.png
select t2.Id Id
from Weather t1
join Weather t2
on DATEDIFF(t2.RecordDate, t1.RecordDate) = 1
where t2.Temperature > t1.Temperature
image.png
delete p1 from (person as p1 left join person as p2 on p1.email = p2.email) where p1.id > p2.id ;