Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/* Four SELECT statements needed in total to solve all queries below . Query 1 . Write one SELECT statement to display SupplierID and Avg_UnitPrice

/* Four SELECT statements needed in total to solve all queries below.

Query 1.

Write one SELECT statement to display SupplierID and Avg_UnitPrice of each supplier. Avg_UnitPrice is the average unit price of products of a supplier. Sort output by SupplierID.

Hint: all suppliers are included

Query 2.

Copy the statement of Query 1 and modify it to display SupplierID and Avg_UnitPrice of suppliers whose average unit price is between $15 and $22. Sort output by SupplierID.

Hint: 8 suppliers

Query 3.

Copy the statement of Query 2 and modify it to display SupplierID and Avg_UnitPrice of suppliers whose average unit price is ranked #1 and #2 (i.e., the highest two averages).

Hint: 3 suppliers

Query 4.

Copy the statement of Query 3 and modify it to display the same output plus two more columns: CompanyName and Phone of each included supplier.

Hint: 3 suppliers, join Suppliers table

*/

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

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

Compute the derivative f(x)=(x-a)(x-b)

Answered: 1 week ago