kodi Database find duplicates movies

list movies that having duplicate entries

SELECT idMovie, count(c00) FROM movie GROUP BY c00 HAVING COUNT(c00) > 1

This would list movies that having duplicates. As if you require to delete the duplicates then run this query:

To delete:

delete from movie where idMovie=ANY(SELECT * from (SELECT idmovie FROM movie GROUP BY c00 HAVING COUNT(c00) > 1) as old)

Leave a Reply

Your email address will not be published. Required fields are marked *