Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write SQL codes for these requirements based off of the five tables below. I hav

ID: 3737376 • Letter: W

Question

Write SQL codes for these requirements based off of the five tables below. I have attached five pictures of the five tables there are with what each of them contain.
1.List unique item classes stored in my database.
2.List the warehouse number and the number of different parts stored in each warehouse, only include those warehouse with more than 2 different parts.
3.List the warehouse number and the maximum number of units on hand for parts stored in each of the warehouse. Rename the new column Max_UOH.
4.List the part number, total dollar amount for each part stored, and the warehouse number for the part. Rename the calculated column TOTAL_AMOUNT. TOTAL_AMOUNT=Units_ON_HAND*UNIT_PRICE
5.List the class and total number of units on hand for each class. Rank your results in descending order on the total number of units on hand.
6.List stored information for all the orders placed between August 3rd and August 6th of 2013. (not including August 3rd 2013 and August 6th 2013).
7.List all the order date and the number of orders placed on each date. Rank your results in descending order on the number of orders.
8.List the warehouse number and the average unit price for warehouses other than number 2.
9.List the stored part information for SG parts stored in warehouse 2 or 3.
10.List the part number and part description for each part with letter D (or d) in the part_description. Rank your results in ascending order on item class and then descending order on units_on_hand.
11.List the average unit price among all the parts. Rename the column as AVG_UNIT_PRICE
12.List the part number and part description for each part with nine characters or ten characters in the part_description. Rank your results in ascending order on part number.
13.Find the item classes and the number of parts under each class. Only show those classes with at least 3 types of parts.
14.List the stored part information for SG parts or parts with more than 60 units stored in warehouse 3.
15.List the number of different part stored in each warehouse, only include those warehouse with at most 3 parts.
SELECT FRON ORDER LNE ORDER NUMBER PART NUMBER NUMBER ORDERED 21 05 22.95 4999

Explanation / Answer

Hi friend, Question is too long. As per the chegg Guideline, please post only 4 parts of a big probleam.

I have answered first 5 parts.

Please repost others in separate post.

Please find my SQL Query for your questions
1.

Select * from orders where order_date between '03-AUG-2013' and '06-AUG-2013';

2.

Select order_date,count(order_number) from orders group by order_date order by count(order_number) desc;

3.

Select warehouse_number,avg(unit_price) from part group by warehouse_number having warehouse_number != 2;

4.

Select * from part where item_class ='SG' and warehouse_number = 2 or warehouse_number = 3;

5.

Select part_number,part_description from part where part_description like '%d' or part_description like '%D' order by item_class,units_on_hand desc;

Please rate my answer if it helped you.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote