Course Q

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?
 
G

Guest

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.
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top