Deleting duplicates from a table
DELETE FROM tablename tbl WHERE EXISTS (SELECT 1 FROM tablename tbl1 WHERE tbl1.unique_value = tbl.unique_value AND tbl1.id > tbl.id);
Updated less than a minute ago
DELETE FROM tablename tbl WHERE EXISTS (SELECT 1 FROM tablename tbl1 WHERE tbl1.unique_value = tbl.unique_value AND tbl1.id > tbl.id);
Updated less than a minute ago