Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following three relations: PROFESSOR (name specialization, salary) STUDENT (name, address, study-type) COURSE (number, stud-name, prof-name, grade) Write the SQL queries corresponding to the

image text in transcribed
Consider the following three relations: PROFESSOR (name specialization, salary) STUDENT (name, address, study-type) COURSE (number, stud-name, prof-name, grade) Write the SQL queries corresponding to the following questions. a. Find the number of different students who are taking courses. b. Find the average salary of professors. c. Find the number of courses tutored by each professor. d. Show the names and salaries of professors who teach student "John McDonald" in descending order of salary (use a subquery). descending order of salary (do not use a subquery) type = "individual". e. Show the names and salaries of professors who teach student "John McDonald" in f. Show the names and salaries of professors who have never taught a student with study- g. Show the names and salaries of professors who teach more than 20 different students

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_2

Step: 3

blur-text-image_3

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

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

Is external connectivity (to the Internet, for example) required?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago