Searching for and counting duplicate entries in MySQL

Let’s say you have a table and you want to know how many rows have the same e-mail adress.

SELECT count(*), email FROM email_list GROUP BY email HAVING count(*)>1 ORDER BY count(*) DESC;

Leave a Reply