mysql group by 取第一条

select * from table where id in (select max(id) from table group by sku)

说明:id是自增序列,sku是表中的一个字段

原文地址:https://www.cnblogs.com/gunduzi/p/10605742.html