Question: 3 SQL Statements. Here are the relational database tables PARTS(PNO, PNAME, QOH, PRICE, OLEVEL) CUSTOMERS(CNO, CNAME, STREET, ZIP, PHONE) EMPLOYEES(ENO, ENAME, ZIP, HDATE) ZIPCODES(ZIP, CITY)
3 SQL Statements.
Here are the relational database tables
PARTS(PNO, PNAME, QOH, PRICE, OLEVEL)
CUSTOMERS(CNO, CNAME, STREET, ZIP, PHONE)
EMPLOYEES(ENO, ENAME, ZIP, HDATE)
ZIPCODES(ZIP, CITY)
ORDERS(ONO, CNO, ENO, RECIEVED, SHIPPED)
ODETAILS(ONO, PNO, QTY)
1.Retrieve a list of part numbers, part name, and total quantity ordered for that part. Produce a listing sorted in decreasing order of the total quantity ordered.
2.Retrieve the average waiting time(number of days) for all orders. The waiting time is defined as the difference between shipping date and order date received date rounded up the the nearest day.
3.For each employee, retrieve his number, name, and total sales in a given year, say 2005.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
