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))
select * from 表 where name=(select top 1 name from 表 gorup by name order by count(*) desc) 提示语法错误 怎么..
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))
where name=(select top 1 name from 表 gorup by name order by count(*) desc)
提示语法错误 怎么..