Question: Consider the following relations: Student (snum: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets_at: string, room: string, fid: integer) Enrolled

Consider the following relations: Student (snum: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets_at: string, room: string, fid: integer) Enrolled (snum: integer, ename: string) Faculty (fid: integer, fname: string, deptid: integer) Write the following queries in SQL. 1. Find the names of the students that are enrolled in all the classes. 2. Find the names of the classes and their designated rooms that have five or more students enrolled. 3. Find the names of students who are enrolled in the course called Math101. 4. Find the names of the faculty members who do not teach any class. 5. Find the name of classes in which only students of the first year are enrolled.
Step by Step Solution
3.44 Rating (147 Votes )
There are 3 Steps involved in it
1 SELECT DISTINCT sname FROM Student WHERE snum IN S... View full answer
Get step-by-step solutions from verified subject matter experts
