delete from duplicates where rowid not in ( SELECT MIN(rowid)
FROM duplicates GROUP BY id)