Deleting duplicate records in a MySQL database while keeping only one
Find duplicate type SELECT type FROM table GROUP BY type HAVING count(type) > 1; Find the smallest id in duplicate type data SELECT min(id) FROM table GROUP BY type HAVING count(type) > 1; Find non-smallest ids in duplicate type data (those to be deleted) SELECT id F