Question
I have a schema that looks like this These are the SQL queries I need 1. Find the names of the top 4 instructors who
I have a schema that looks like this
These are the SQL queries I need
1. Find the names of the top 4 instructors who have taught the most number of distinct courses. Display also the total number of courses taught.
Output columns: InstructorName, NumberOfCoursesTaught Sort by: NumberOfCoursesTaught in descending order
2. Find the top 3 semesters in which the most number of courses were offered. (Treat Spring of 2009 and Spring of 2010 as two different semesters.
Output columns: Semester, Year, NumberOfCourses
Sort by: NumberOfCourses in descending order
3. Find the top 2 students who have taken the most number of courses.
Output columns: S_ID, StudentName, NumberOfCourses
Sort by: NumberOfCourses in descending order
Classroom(building, room number, capacity) Department(dept name, building, budget) Course(course id, title, dept name, credits) Instructori id, name, dept name, salarv) Sectionlcourse id. sec id. semester, vear, building, room number, time slot id) Teaches(i id, course id, sec id, semester, year) StudentStep by Step Solution
There are 3 Steps involved in it
Step: 1
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