Mysql count all duplicates based on a field

Oct 2 2011 by Andrew Brown

I always forget this so I’m just going to micro blog about it here.

select email, count(email) as c from users group by email having c > 1 order by c;

Write a Comment to “Mysql count all duplicates based on a field”