标签:
SELECT aa.* FROM a_user aa WHERE version = ( SELECT max(version) FROM a_user WHERE type = aa.type ) ORDER BY aa.type desc
sql分组取最大值
原文地址:http://www.cnblogs.com/songfahzun/p/5946367.html