select id,order from (select count(*) as OrderC,id from help group by id) tt order by tt.OrderC desc
smblog
2014 年 6 月 21 日
写错了。。不过大概就是这样的思路。。
Ransford
2014 年 6 月 21 日
@smblog @andyhu 多谢二位~~我昨天是这个思路解决的,用的jion select * from `wage_month_detail_info` as A join (SELECT perType,count(perType) as c FROM `wage_month_detail_info` group by perType) as B on A.perType=B.perType order by B.c desc;