Delete duplicate rows but keep the earliest row (by date criteria) - SQL Server

Viewed 4979

I have this table and three columns (ID, Email, [Last Update].

I want to delete duplicate emails but keep the last updated row (by date criteria). In this example, aaa is duplicated. It has 1 row in 2011 and other in 2014. I want to keep just 2014.

ID       Email          Last update         
a-4        aaa           10/01/2011 
b-1        bbb           10/02/2012    
k-1        ccc           05/03/2013    
d-9        aaa           10/08/2014
t-7        bbb           02/09/2015
4 Answers
Related