I have table sort of like
Name |DateOfEvent|EventType
----------------------------------
Smith |10/1/2005 |New
Thomas |1/1/2002 |Updated
Johnson |6/1/2002 |New
Smith |7/1/2008 |Updated
Smith |7/1/2000 |New
I want to return rows where the event is say New and the date is before a row with the same name but the EventType is Updated with a later date.
My thought is to iterate over the table with each row with the name but that seems really inefficient. Is there a better way to do this?