MySQL provides you with the DELETE JOIN statement that allows you to remove duplicate rows quickly. The following statement deletes duplicate rows and keeps the highest id:
DELETE t1 FROM table_name t1
INNER JOIN table_name t2 
WHERE 
    t1.id < t2.id AND 
    t1.email = t2.email;
by გიორგი უზნაძე
4 years ago
MySQL
Duplicate
2
Pro tip: use ```triple backticks around text``` to write in code fences