Jag skulle kontrollera UpdateDate mot en korrelerad underfråga.
CREATE TEMPORARY TABLE
latestRecord (
Email VARCHAR(128),
updateDate DATETIME
)
INSERT INTO
latestRecord
SELECT
Email,
MAX(updateDate) AS updateDate
FROM
table_1
GROUP BY
Emal
DELETE
table_1
FROM
table_1
INNER JOIN
latestRecord
ON latestRecord.Email = table_1.Email
AND latestRecord.updateDate < table_1.updateDate
REDIGERA
Ytterligare en refaktor med samma logik