Finding Duplicates with SQL::
SELECT `email`,
COUNT(`email`) AS NumOccurrences
FROM `user`
GROUP BY `email`
HAVING ( COUNT(`email`) > 1 )
SELECT `email`,
COUNT(`email`) AS NumOccurrences
FROM `user`
GROUP BY `email`
HAVING ( COUNT(`email`) > 1 )
For Single Occurance emails::
ReplyDeleteSELECT email
FROM users
GROUP BY email
HAVING ( COUNT(email) = 1 )