select id,order from (select count(*) as OrderC,id from help group by id) tt order by tt.OrderC desc
smblog
2014-06-21 01:06:46 +08:00
写错了。。不过大概就是这样的思路。。
Ransford
2014-06-21 19:15:30 +08:00
@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;