select TOP 10 省份 from 表 order by 省份

解决方案 »

  1.   

    select top 10 A.*
    from 表名 A inner join 
    (select 省份, Count(*) AS Cnt
    from 表名
    group by 省份) B on A.省份 = B.省份
    order by B.Cnt desc
      

  2.   

    2楼的好象不对啊,省份不能直接排序的,肯定要用count聚合函数的,3楼的正在测试中,不过我的是在一张表中的,你给我的是不同表的,我是初学,反而有点看不懂了,呵呵
      

  3.   

    select TOP 10 T.省份 from 表 T  order by (select count(*) from 表 where T.省份=省份) DESC
      

  4.   

    select top 10 A.*
    from 表名 A inner join 
    (select 省份, Count(*) AS Cnt
    from 表名
    group by 省份) B on A.省份 = B.省份
    order by B.Cnt desc这就是一张表啊,只不过有子查询