Question: I need help with bonus tasks only! Nested Queries. I have the tables in the first picture created, but have not been able to complete
I need help with bonus tasks only! Nested Queries. I have the tables in the first picture created, but have not been able to complete the bonus questions.
Bonus Task: Nested Queries marks
For this bonus task, you will need to write nested queries to answer more complex questions.
Each query should demonstrate your understanding of how to use subqueries effectively in SQL
Bonus Task : Find Students Who Have Taken All Courses in a Specific Department
marks
Write a query to find all students who have taken all the courses offered by the 'Comp. Sci.
department.
Hint: Use a nested query to first select all the courses from the 'Comp. Sci. department,
and then compare it with the courses that each student has taken.
Bonus Task : Find Courses with Enrollment Greater Than the Average Enrollment
marks
Write a query to find all courses that have an enrollment greater than the average enrollment of
all courses.
Hint: Use a nested query to compute the average enrollment first, and then compare it
with the enrollment of each course.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
