Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
1 SELECT DISTINCT sname FROM Student WHERE snum IN S...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started