It's easy to find duplicates with one field:
SELECT email, COUNT(email)
FROM users
GROUP BY email
HAVING COUNT(email) > 1
So if we have a table
ID NAME EMAIL
1 John asd@asd.com
2 Sam asd@asd.com
3 Tom asd@asd.com
4 Bob bob@asd.com
5 Tom asd@asd.com
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?