10
I am using SQL Server and I have a table with the following columns:
SessionId | Date | first name | last name
I would like to do group by sessionId and then get the row with the max date.
For example:
xxx | 21/12/2012 | f1 | l1
xxx | 20/12/2012 | f2 | l2
yyy | 21/12/2012 | f3 | l3
yyy | 20/12/2012 | f4 | l4
I would like to get the following rows:
xxx | 21/12/2012 | f1 | l1
yyy | 21/12/2012 | f3 | l3
Thank you