Hi,
I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated.
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Feb 1, 2012, 11:43 AM
Try this...
SELECT name, COUNT(*) AS 'Count'
FROM emp
GROUP BY name having count(*)>1
Thanks