Question: 3. SQL Queries (Data Manipulation Language (DML) Part) The questions are based on the following relational schema (keys are underlined): Student (sid: integer, sname: string,

 3. SQL Queries (Data Manipulation Language (DML) Part) The questions are

3. SQL Queries (Data Manipulation Language (DML) Part) The questions are based on the following relational schema (keys are underlined): Student (sid: integer, sname: string, major:string, age: integer) Takes (sid: integer, cid: integer) Class (cid: integer, cname: string, instructor:string, room: string, meet at time) (a) Write the following query in SQL: Find the names of students who are enrolled in the classes offered by the instructor 'Bo Li'. (b) Write the following query in SQL: Find the names of all students who are enrolled in both 'Database' and 'Algorithm'classes. () Write the following query in SQL: Find the names of all students who are enrolled in 'Database' class but not in 'Algorithm'class. (d) Write the following query in SQL: Find the names of all students who are not enrolled in any class. (e) Write the following query in SQL: For each class, find the average age of all students who are enrolled in that 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!