Question 5
Consider the relational schemas Student, Course and Enrollment:
Student(SId, Name, Age, DOB, Phone_Number)
Course(CId, CName, Credits)
Enrollment(EId, SId, CId, Term)
Now consider the following SQL query:
SELECT S.NameFROM Student SWHERE NOT EXISTS ( SELECT * FROM Course C WHERE NOT EXISTS ( SELECT * FROM Enrollment E WHERE E.SId = S.SId AND E.CId = C.CId ))The query returns:
Names of students who have enrolled in at least one course
Names of students who have enrolled in exactly one course
Names of students who have enrolled in all available courses
Names of students who have not enrolled in any course