解决方案 »

  1.   

    select * from (
    select name,count(name) seq from table group by name)
    order by seq desc
      

  2.   

    select name from 
      (select name, count(1) over(partition by name) cnt from 表1 ) t
    order by cnt
      

  3.   


    select name from 
      (select name, count(1) over(partition by name) cnt from 表1 ) t
    order by cnt desc
      

  4.   

    select name, 
    count(1) over(partition by name) cnt
    from 表1
    order by cnt
      

  5.   

    楼主看这个
    http://blog.sina.com.cn/s/blog_5165537f0100ys27.html
      

  6.   

    SELECT NAME,   COUNT(1)  OVER(PARTITION BY NAME)  COUNT_NUM FROM 表1 ORDER BY COUNT_NUM