Find duplicates in the same table in MySQL

You can use a grouping across the columns of interest to work out if there are duplicates.

SELECT
    artist, release_id, count(*) no_of_records
FROM table
GROUP BY artist, release_id
HAVING count(*) > 1;

Leave a Comment