Finding Duplicates with SQL

Finding Duplicates with SQL::

 

SELECT `email`,
 COUNT(`email`) AS NumOccurrences
FROM `user`
GROUP BY `email`

HAVING ( COUNT(`email`) > 1 )

Leave a Reply

Your email address will not be published. Required fields are marked *