DELETE c1 FROM tablename c1 INNER JOIN tablename c2 WHERE c1.id > c2.id AND c1.unique_field = c2.unique_field;