Hi all
I have a table which contains over 5000 records. One student can be present many times and they have a unique ID. Each row relates to a student and contains the date of when they enrolled on a specific course.
How do I query the table so I return the second most recent enrollment date? So if a client has enrolled 5 times, with the 5th being the most recent, I want the date of the 4th. Similarly, if the client has enrolled 30 times, I'd want the date of the 29th time.
The enrollment date field is sorted in ascending order (if that matters).
I'm thinking of some combination of 'Large', 'Index' and 'Rank' but I have no idea where to start or if these are in fact Excel only functions.
Thanks.
I have a table which contains over 5000 records. One student can be present many times and they have a unique ID. Each row relates to a student and contains the date of when they enrolled on a specific course.
How do I query the table so I return the second most recent enrollment date? So if a client has enrolled 5 times, with the 5th being the most recent, I want the date of the 4th. Similarly, if the client has enrolled 30 times, I'd want the date of the 29th time.
The enrollment date field is sorted in ascending order (if that matters).
I'm thinking of some combination of 'Large', 'Index' and 'Rank' but I have no idea where to start or if these are in fact Excel only functions.
Thanks.