I’ve got a data set that looks as follows:

The first column is an auto-increment primary key. The second column is an ID number for whatever, maybe 3 rocks with IDs 1, 2 and 3 respectively. (I probably should have used the standard customer and order example but oh well.) The third column is a date when I threw the rock. I track the date each time the rock is thrown, hence the multiple IDs (the second column) each with a throwing time.
I want a query to return the rock ID and most recent date for each ID. The result of course would have a single record for each ID – the one with the latest access time.
I’m struggling with the possible combination of “DISTINCT”, “TOP 1” and “GROUP BY” clauses that gives the result I want.
If you want also the autoincrement row id then