Finding Duplicates 👯
SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name HAVING COUNT(*) > 1;
- Group rows by the column you're checking.
- Use HAVING to filter groups with multiple rows.
SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name HAVING COUNT(*) > 1;