duplicate values in a column sql code example
Example 1: find duplicates mysql column
SELECT name, COUNT(*) c FROM table GROUP BY name HAVING c > 1;
Example 2: sql query to find duplicates in column
SELECT name, COUNT(email)
FROM users
GROUP BY email
HAVING COUNT(email) > 1