Hi all
It's been a while since I used Access and I'm currently tying myself in knots with a query on data imported from another system. I can code a little, but in this case I'm trying to just use the query builder and can't quite get the results I want.
Simplified version - Fields are PersonId, StartDate and ApplicationId (unique).
The personId can be in the table multiple times. I'm trying to find the person's latest start date and the corresponding ApplicationID. So I'm grouping by personId and selecting Max for StartDate, but I'm struggling to get it to return the applicationID for that date.
And I want it to return
Hope that makes sense - any an all input much appreciated!!!!
Mary
It's been a while since I used Access and I'm currently tying myself in knots with a query on data imported from another system. I can code a little, but in this case I'm trying to just use the query builder and can't quite get the results I want.
Simplified version - Fields are PersonId, StartDate and ApplicationId (unique).
The personId can be in the table multiple times. I'm trying to find the person's latest start date and the corresponding ApplicationID. So I'm grouping by personId and selecting Max for StartDate, but I'm struggling to get it to return the applicationID for that date.
Person Id | Start Date | Application Id |
1234 | 1st April 2023 | 121212 |
1234 | 5th May 2023 | 678987 |
1234 | 11th October 2022 | 145687 |
Group By | Max | ????? |
And I want it to return
1234 | 5th May 2023 | 678987 |
Hope that makes sense - any an all input much appreciated!!!!
Mary