select * from 表
where name=(select top 1 name from 表 gorup by name order by count(*) desc)

解决方案 »

  1.   

    select * 
    from t a
    where not exists(select 1 from t 
                     where name<>a.name 
                           and (select count(*) from t where name =t.name)
                               >(select count(*) from t where name=a.name))
      

  2.   

    select * from 表
    where name=(select top 1 name from 表 gorup by name order by count(*) desc)
    提示语法错误 怎么..