Question: (40 points) Q2. Consider the following relations: Student(sid: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets at: string, room: string, fid:

 (40 points) Q2. Consider the following relations: Student(sid: integer, sname: string,

(40 points) Q2. Consider the following relations: Student(sid: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets at: string, room: string, fid: integer) Enrolled(sid: integer, cname: string) Faculty(fid: integer, fname: string, deptid: integer) The meaning of these relations is straightforward; for example, Enrolled has one record per student-class pair such that the student is enrolled in the class. Write the following queries in SQL. No duplicates should be printed in any of the answers. 1. Find the age of the youngest student who is enrolled in a course taught by I. Teach. 2. Find the names of all classes that have ten or more students enrolled. 3. Find the names of all classes that either meet in room R128 or have ten or more students enrolled. . For all levels except JR, print the level and the maximum age of students for that level. 5.1 Find the names of students not enrolled in any class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!