华为一道面试题

一个表中的Id有多个记录,把所有这个id的记录查出来,并显示共有多少条记录数。
------------------------------------------

select id, Count*) from tb group by id having count(*)>1
select * from(select count(ID) as count from table group by ID)T where T.count>1
原文地址:https://www.cnblogs.com/mianshi/p/1895940.html