DELETE FROM menschen
WHERE id NOT IN (
SELECT * FROM (
SELECT MIN(pid) FROM menschen
GROUP BY nachname, vorname
)
AS ua
);
Aus <https://berlin-drupal.de/blog/doppelte-eintraege-in-sql-datenbank-effizient-loeschen>