I am having trouble trying to query data to return the most current date, per ID. There are multiple records per ID in the table.
Data Example:
ID Date
123 2/28/02
111 1/31/02
123 1/01/02
111 11/30/01
222 5/31/02
222 12/31/01
111 11/30/01
My customer would like to see only the following data:
ID Date
123 2/28/02
111 1/31/02
222 5/31/02
I tried to query using TOP 1 and order by DATE desc to get the most current data. This sort of works but, unfortunatly only returns one record. I need to know the most current date for each ID.
Any thoughts on how do do this?
Thanks,
Jenn Thanks!
Jenn
Data Example:
ID Date
123 2/28/02
111 1/31/02
123 1/01/02
111 11/30/01
222 5/31/02
222 12/31/01
111 11/30/01
My customer would like to see only the following data:
ID Date
123 2/28/02
111 1/31/02
222 5/31/02
I tried to query using TOP 1 and order by DATE desc to get the most current data. This sort of works but, unfortunatly only returns one record. I need to know the most current date for each ID.
Any thoughts on how do do this?
Thanks,
Jenn Thanks!
Jenn