I have the following table:
Table: UserName
Userid User UserUpdate
1 Dan 1/1/2005
1 Dan 1/1/2007
1 Dan 1/1/2009
2 Pam 1/1/2005
2 Pam 1/1/2006
2 Pam 1/1/2008
3 Sam 1/1/2008
3 Sam 1/1/2009
I need to extract the latest updated for all these users, basically here's what I'm looking for:
Userid User UserUpdate
1 Dan 1/1/2009
2 Pam 1/1/2008
3 Sam 1/1/2009
I've tried doing a SELECT TOP or Max but get only the latest result, i.e. 1 result for the WHOLE table, which is not what I want.