It's easy to find duplicates with one field:
SELECT email, COUNT(email)
GROUP BY email
HAVING COUNT(email) > 1
So if we have a table
ID NAME EMAIL
1 John firstname.lastname@example.org
2 Sam email@example.com
3 Tom firstname.lastname@example.org
4 Bob email@example.com
5 Tom firstname.lastname@example.org
Because they all have the same email, this query will return John, Sam, Tom, and Tom. To receive duplicates with the same email and name is what I actually want, though.
I want to obtain "Tom," "Tom," in other words.
I made a mistake and permitted the insertion of duplicate name and email values, which is why I require this. I must first locate the duplicates before I can remove or modify them.
Can someone please help me with this?