I'm using MySQL 4.1.1
I've inherited a database which has some (almost) duplicate rows.
The databse is like this.
userID
userPosition
userDepartment
No user should be in more than one department but some are. I need to
find all the users who are listed in more than one department for manual
fixing.
I can do something like
SELECT *, COUNT(userID)
FROM users
GROUP BY COUNT(userID)
ORDER BY COUNT(userID) DESC
But that still gives me all 10,000 rows. All I want is where
COUNT(userID) > 1
If I add a WHERE clause to that effect I just get error messages.
Any suggestions?