SELECT *, COUNT(*) FROM users GROUP BY COUNT(*)
Now, how can I show the results from above where COUNT(*) is greater than 1? What I am trying to do if find all the duplicate usernames (i'm trying to clean up an old database before I use it in a new project)
If I make the username field unique, it only shows me the duplicates one at a time. Quite tedious.