I have two tables, one with a date, PK and a FK to the second table. I need to select the latest date and the two keys for every group of FK's. If my data is this:
Date PK FK
1/1/2001 111/5/2002 212/2/2001 316/6/2005 421/1/2005 52
Then I'd like my output to look like this:
Date PK FK
1/5/2002 216/6/2005 42
I'm having trouble coming up with a query to do this. Any ideas?