Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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) Student

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

What are the stages of project management? Write it in items.

Answered: 1 week ago

Question

why do consumers often fail to seek out higher yields on deposits ?

Answered: 1 week ago

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago