Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tables S represent suppliers, Tables P represent Parts, while tables SP represent both (see specifications) Use the given tables and create the SQL commands which

Tables S represent suppliers, Tables P represent Parts, while tables SP represent both (see specifications)

image text in transcribed

Use the given tables and create the SQL commands which satisfy the condition for each question Tables: s S2 S3 S4 S5 Smith Jones Blake 20 10 30 20 30 Pl P2 P3 P4 P5 Blue Paris Blue SP 300 200 P1 P2 P3 P4 P5 P1 P2 P1 P2 P3 P2 P3 P4 200 100 300 S2 S2 S3 S3 S3 S4 S4 S5 100 200 200 200 200 Example SELECT * FROM ORDER BYsCity, sStatus; SELECT FROM COUNT (SNO) Questions For each red part display the total, minimum, average, and maximum quantity of large individual orders, but only from suppliers from 'London', as well as the number of such orders. A "larger order" is any tuple (SNo. pNo gty) in SP that has a quantity larger than 150. Display information in ascending order by the total quantity For each part, find the count, sum, minimum, maximum, and average qty on order. Display information in the ascending order by the sum of quantities. For each red part, find the count, sum, minimum, maximum, and average qty on order. Display information in the ascending order by the sum of quantities. 4 For each part find the total number of orders, total quantity on order, minimum, maximum, and average qty on order from suppliers located in 'London 5 Find the number of suppliers located in each city. Display the information in reverse order by city

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 Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago