Live2D 看板娘 / Demo

获取分组后取某字段最大一条记录

获取分组后取某字段最大一条记录
方法一:(效率最高)
select * from test as a 
where typeindex = (select max(b.typeindex) 
from test as b 
where a.type = b.type );

 

posted @ 2016-12-08 08:46  MChuang  阅读(657)  评论(0编辑  收藏  举报