I'm having trouble designing a query in MCASSESS to generate the results I need. Can anyone provide any insight into how I need to build this correctly?
I have three tables relating to courses employees can take. Table1 is a list of courses, Table2 is a list of dates that courses were offered, and Table3 is a list of users registered for the course, and the recorded score.
I need to be able retrieve a list of employees that have taken a particular course (CourseID) and their associated score. Employees may take the course more than once. I only need the most recent date.
The data for Table3 is entered manually, and may not be entered chronologically.
Table1: CourseID, CourseName
Table2: ClassID, CourseID, ClassDate
Table3: RegID, EmpID, ClassID, Score
Sample Data for Table 1
1 - Sample Class 1
2 - Sample Class 2
Sample Data for Table2
7 - 1 - 4/1/2011
8 - 1 - 4/5/2011
9 - 2 - 4/3/2011
Sample Data for Table3
2 - MD57780 - 8 - 90
3 - MD57780 - 7 - 70
4 - MD57780 - 9 - 80
Sample Results for Course 1
MD57780 - Sample Class 1 - 4/5/2011 - 90
I don't necessarily need someone to "build" this query (although I wouldn't object to a working example), but I would like a little help into the direction I need to go to generate the results I need.
Any help at all would be appreciated.
Thanks!
I have three tables relating to courses employees can take. Table1 is a list of courses, Table2 is a list of dates that courses were offered, and Table3 is a list of users registered for the course, and the recorded score.
I need to be able retrieve a list of employees that have taken a particular course (CourseID) and their associated score. Employees may take the course more than once. I only need the most recent date.
The data for Table3 is entered manually, and may not be entered chronologically.
Table1: CourseID, CourseName
Table2: ClassID, CourseID, ClassDate
Table3: RegID, EmpID, ClassID, Score
Sample Data for Table 1
1 - Sample Class 1
2 - Sample Class 2
Sample Data for Table2
7 - 1 - 4/1/2011
8 - 1 - 4/5/2011
9 - 2 - 4/3/2011
Sample Data for Table3
2 - MD57780 - 8 - 90
3 - MD57780 - 7 - 70
4 - MD57780 - 9 - 80
Sample Results for Course 1
MD57780 - Sample Class 1 - 4/5/2011 - 90
I don't necessarily need someone to "build" this query (although I wouldn't object to a working example), but I would like a little help into the direction I need to go to generate the results I need.
Any help at all would be appreciated.
Thanks!