时间:2021-07-01 10:21:17 帮助过:26人阅读
SELECT * FROM carregisterinfo a WHERE (a.plate) IN ( SELECT plate FROM carregisterinfo GROUP BY plate HAVING count(*) >= 1 ) AND id IN ( SELECT max(id) FROM carregisterinfo GROUP BY plate HAVING count(*) >= 1 )
原表数据如下:
mysql过滤重复项留下最新项
标签:group from mamicode 重复 inf 最新 where mic png