Course Q

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following tables: student, course, registration into course. To
receive a certificate the student must take three required courses (say 1, 2,
and 3). I want to identify only those students who have taken all three. How
do I create this "all inclusive" criteria in the QBE?
 
It depends on your table structure.

It would be helpful if you could provide us with the table names, and the
names of the fields in each table (identify if these are PK or FK values) and
if so, what table/field they relate to.
 
northstar said:
I have the following tables: student, course, registration into course. To
receive a certificate the student must take three required courses (say 1, 2,
and 3). I want to identify only those students who have taken all three. How
do I create this "all inclusive" criteria in the QBE?


Use a Totals query that counts the required courses taken
for each student.

SELECT students.studentID, Count(*) as Taken
FROM (students INNER JOIN registrtions
ON students.studentID registrtions.studentID)
INNER JOIN Courses
ON registrtions.courseID = Courses.courseID
WHERE Courses.required = True
GROUP BY students.studentID
HAVING Count(*) >= 3
 
Back
Top