select * from (
select * from table_name order by create_time desc
) as t
group by t.id;
对于mysql 5.7及以上版本,需要加入limit限制,否则不生效
select * from (
select * from table_name order by create_time desc limit 100000
) as t
group by t.id;
如需转载请保留本文出处: https://zhe94.com/878.html