第1个回答 2011-05-25
select distinct cip ,cs_Referer,count(distinct cs_Referer) col from logdb where cip ='66.249.70.230' order by col desc本回答被提问者采纳
第2个回答 2015-05-20
select a,b,count(b) as x
from test
where a=0
group by a,b
having count(b)>=1
order by count(b)本回答被网友采纳
第3个回答 2011-05-24
select * from (
select * from (
select top 3 mdg,qsg,count(mdg) cont from HxTable
where Qsg ='青岛' group by mdg,qsg
order by count(mdg) desc)t1
union all
select * from(
select top 2 mdg,qsg,count(mdg) cont from HxTable
where Qsg ='宁波' group by mdg,qsg
order by count(mdg) desc)t2
union all
select * from (
select top 3 mdg,qsg,count(mdg) cont from HxTable
where Qsg ='上海' group by mdg,qsg
order by count(mdg) desc)t3
) as result
order by cont desc