please help me in detail. clear answer question a to g 2. Use the INVENTORY tabl
ID: 3749140 • Letter: P
Question
please help me in detail. clear answer question a to g
2. Use the INVENTORY table to write SOL statements for the following queries. Make sure to include the screen capture of the SQL output that you get after executing each of the query. a) Display unique SKU, SKU_Description for all products having a description starting with b) Display unique SKU, SKU_Description for all products having a description containing the 1f-Dome". (4 points) word Climb'. (4 points) c) Display unique SKU, SKU_Description for all products having a 'd' in the third position from the left in the SKU_Description. (5 points) d) Write an SQL statement that uses all of the SQL built-in functions (COUNT, SUM, AVG, MAX, MIN) on the QuantityOn-Hand column. Include meaningful column names in the result. (5 points)Explanation / Answer
a) SELECT DISTINCT SKU, SKU_Description FROM INVENTORY WHERE SKU_Description LIKE 'Half-Dome%';
b) SELECT DISTINCT SKU, SKU_Description FROM INVENTORY WHERE SKU_Description LIKE '%Climb%';
c) SELECT DISTINCT SKU, SKU_Description FROM INVENTORY WHERE SKU_Description LIKE '__d%';
d) SELECT avg(QuantityOnHand) AS AVG_QUANTITY_ON_HAND, min(QuantityOnHand) AS MIN_QUANTITY_ON_HAND, max(QuantityOnHand) AS MAX_QUANTITY_ON_HAND, count(QuantityOnHand) AS COUNT_QUANTITY_ON_HAND, sum(QuantityOnHand) AS SUM_QUANTITY_ON_HAND FROM INVENTORY;
e) SELECT WarehouseID, sum(QuantityOnHand) AS TotalItemsOnHand FROM INVENTORY GROUP BY WarehouseID ORDER BY TotalItemsOnHand DESC;
NOTE: As per Chegg policy, I am allowed to answer only 4 questions on a single post. I have gone ahead and answered 5 questions. Kindly post the remaining questions separately and I will try to answer them. Sorry for the inconvenience caused.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.