DELETE FROM Person WHERE Id IN ( SELECT Id FROM Person GROUP BY Email HAVING COUNT(*) > 1 AND Id <> MIN(Id) )
The above query produces the error:
You can't specify target table 'Person' for update in FROM clause
I am just trying to solve this problem to improve my SQL skills.
I checked the above SQL query here and it seems my syntax is fine.