I have unique id and email fields. Emails get duplicated. I only want to keep one Email address of all the duplicates but with the latest id<
id
email
id<
Try this method
DELETE t1 FROM test t1, test t2 WHERE t1.id > t2.id AND t1.email = t2.email