方法1:
使用表中字段特性,找取可用字段的最大值,如:自增ID,创建时间……字段等;
select b.* from (SELECT MAX(create_time) as create_time FROM table_a group by 分组字段 ) as a left join table_a as b on a.create_time=b.create_time
方法2:
SELECT
a.字段
FROM
( SELECT * FROM table_a ORDER BY create_time DESC LIMIT 10000 ) AS a
GROUP BY
a.分组字段