34,837
社区成员




select top 1 pinglunid , count(*) cnt from tb1,tb2 where tb1.pinglunid = tb2.id
group by pinglunid order by cnt desc
select top 1 pinglunid , count(*) cnt from tb1,tb2 where tb1.pinglunid = tb2.pinglunid
group by pinglunid order by cnt desc
select pinglunid,count(1) num
from table1
group by pinglunid
select top 1 pinglunid , count(*) cnt from tb1,tb2 where tb1.pinglunid = tb2.id
group by pinglunid order by cnt desc
select top 1 pinglunid
from table1
group by pinglunid
order by count(1) desc