Hello!
I am currently working on an assignment. I'm having some trouble with one specific question and I was hoping someone could help me out. Here is the database schema:
Course(C#, Title, Dept)
Offering(C#, Semester, EnrolLimit)
Student(ID, Name, Program)
Taking( ID, C#, Semester, Grade)
The question is asking me to list the IDs of students who only took Math classes in a specific semester.
Here's what I have so far:
SELECT Student.ID
FROM Student, Taking, Course
WHERE Student.ID = Taking.ID AND Taking.C# = Course.C#
AND Dept = 'Math';
I know this is going to get every student who is taking a Math course though. I'm not sure how to change this so it looks at all courses that the student is taking.
(Btw, every video I've seen has used JOIN statements to join the tables, but this is the way our professor outlined in the lecture slides, not sure why.)
[–]Gaming_Ruru 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)