22,207
社区成员
发帖
与我相关
我的任务
分享
select a.* from zhibu a
order by (select count(1) from zhibu b where b.zhh = a.zhh) desc , a.shfzh
select a.* from zhibu a
order by (select count(1) from zhibu b where b.zhh = a.zhh) desc , a.zhfzh
select
a.*
from
zhibu a,
(select zch,count(1) as num from zhibu group by zch)b
where
a.zhh=b.zhh
order by
b.num desc,a.zhh
select * from zhibu as a order by (select count(*) from zhidu where zhh=a.zhh) desc,zhh