pull the last comment

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

i have a list of comments and dates. i want to pull just
the last comment in the following example. Each person
has several records.

John Jones 123-34-6789 1/23/04
John Jones 123-34-6789 2/22/04
Sam Snead 145-65-6789 1/14/04
Sam Snead 145-65-6789 2/24/04

so i want to just pull the last records
john jones 2/22/04 and
sam snead 2/24/04

is this possible?
 
Yes it is

SELECT Name, Key, Max(Date) FROM Table GROUP BY Name, Date

This will give you the last Date for each person.

- Raoul
 
Back
Top