首页 > 代码库 > sql分组取最大值

sql分组取最大值

 

SELECT    aa.*FROM    a_user aaWHERE    version = (        SELECT            max(version)        FROM            a_user        WHERE            type = aa.type    )ORDER BY    aa.type desc

技术分享

 

sql分组取最大值