如何用sql查询出一个表中某列中重复次数最多的值与重复次数

某列中哪个重复最多,,,重复了多少次,,如何查

第1个回答  2009-10-28
select top 1 某列,count(*) from 表 group by 某列 order by count(*) desc
第2个回答  2009-10-28
select column,max(count(*)) from
(select column,count(*) from table
group by column) test;
第3个回答  2009-10-27
SELECT 某列, COUNT(*)
FROM 某表
GROUP BY 某列
ORDER BY COUNT(*)本回答被提问者采纳
相似回答