MYSQL删除一张表的重复数据并且保留id最大的一条
delete ss from summary_statistics ss join ( select industry_id ,
date ,
type , max(id) as maxId from summary_statistics ss group by industry_id ,
date ,
type having count(1) > 1) a on ss.industry_id = a.industry_id and ss.
date = a.date and ss.
type = a.
type where ss.id < a.maxId