Perhaps a little off topic?, but I thought someone here might be experienced in SQL?.
I've got a database I wrote a number of years ago in Delphi, for keeping grading records for our Ju Jitsu club. There are two linked tables, one with the students details, the other with their grading results, linked by membership number. The grading results table consists of 'membership number', 'belt passed', 'grade awarded', and 'grading date'.
What I want to do is run a query that will return a list of students names, along with the last belt they passed - this would obviously be the most recent date in the grading table. I can easily select grading dates after a certain date, but how can I select the latest one for each student?.
I've got a database I wrote a number of years ago in Delphi, for keeping grading records for our Ju Jitsu club. There are two linked tables, one with the students details, the other with their grading results, linked by membership number. The grading results table consists of 'membership number', 'belt passed', 'grade awarded', and 'grading date'.
What I want to do is run a query that will return a list of students names, along with the last belt they passed - this would obviously be the most recent date in the grading table. I can easily select grading dates after a certain date, but how can I select the latest one for each student?.