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: 3738195 • 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.

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.

SELECT FRON ORDER LNE ORDER NUMBER PART NUMBER NUMBER ORDERED 21 05 22.95 4999

Explanation / Answer

Please Give me comment, if you have any doubt...

6)
SELECT *
FROM ORDERS
WHERE ORDER_DATE>'2013-08-03' && ORDER_DATE<'2013-08-06';

7)
SELECT ORDER_DATE, no_of_orders
FROM (SELECT ORDER_DATE, COUNT(*) AS no_of_orders
FROM ORDERS
GROUP BY ORDER_DATE)
ORDER BY no_of_orders DESC;

8)
SELECT WAREHOUSE_NUMBER, AVG(UNIT_PRICE)
FROM PART
WHERE WAREHOUSE_NUMBER <> 2
GROUP BY WAREHOUSE_NUMBER;

9)
SELECT *
FROM PART
WHERE ITEM_CLASS = 'SG' AND (WAREHOUSE_NUMBER =2 OR WAREHOUSE_NUMBER = 3);

10)
SELECT PART_NUMBER, PART_DESCRIPTION
FROM PART
WHERE PART_DESCRIPTION LIKE '%[dD]%'
ORDER BY ITEM_CLASS ASC, UNITS_ON_HAND DESC

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