Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MySql what queries to do the following? Consider tables, of a Supplier-Parts DB, shown in Figure 1 at the end of this paper. Names of

MySql

what queries to do the following?

image text in transcribedimage text in transcribed

Consider tables, of a Supplier-Parts DB, shown in Figure 1 at the end of this paper. Names of tables, columns and identification of primary and foreign keys are shown. As the content of the rows tuples of tablesrelations is transient (it changes over time) and the following questions ask you to write SQL statements to retrieve certain data information from the tables, sample tuples rows are not shown. Questions in this part ask you to write SQL queries that would retrieve certain information from the tables. Display information about suppliers, such that the result is ordered by city (sCity) and then by status (sStatus). Find the number of suppliers. Find the number of suppliers located in each city. Display the information in reverse order by city 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 ty on order. Display information in the ascending order by the sum of quantities. For each part find the total number of orders, total quantity on order, minimum, maximum, and average qty on order from suppliers located in Londor For each red part find the total number of orders, total quantity on order, minimum, maximm, and average qty on order from suppliers located in London Display the total quantity on order for each part that has more than 500 of total quantity on order. Display information in reverse order by part number For each part display the total, minimum, average, and maximum quantity of large individual orders as well as the mumber of such orders. 4 A larger order" is any tuple (sNo, pNo, qty) in SP that has a quantity larger than 150. Display information in reverse order by part number. As above, but display information only for those parts for which the total quantity on order is greater than 500 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. 10 A larger order" is any tuple (sNo, pNo, qty) in SP that has a quantity larger than 150. Display information in ascending order by the total quantity Activate Windows Go to PC settings to activate Win sNo (PKsNo (PK sNo (PK)sNo PK) pColor pWeight SP sNo (PK EK) gty Figure 1. Supplier-Parts DB Tables

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions