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

I am lost trying to write SQL expressions could someone helpme with the followin

ID: 3607961 • Letter: I

Question

I am lost trying to write SQL expressions could someone helpme with the following: Write a SQL expression to display the Warehouse and a count ofQuantityOnHand, grouped by Warehouse. Name the countTotalItemsOnHand and display the results in descending orderof TotalItemsOnHand. I am lost trying to write SQL expressions could someone helpme with the following: Write a SQL expression to display the Warehouse and a count ofQuantityOnHand, grouped by Warehouse. Name the countTotalItemsOnHand and display the results in descending orderof TotalItemsOnHand.

Explanation / Answer

Dear,    In order to able to help you with thisquestion, I have to consider the Table name from which the givenvalues are retrieved.    Let it be PRODUCT for example.    (i) The SQL query to display the Warehouse,count of QualityOnHand grouped by warehouse.       SELECT Warehouse,count(distinct(QualityOnHand))       from PRODUCT GROUPBYWarehouse;    (ii) The SQL query that displays the resultsin descending order of TotaltemsOnHand.       SELECT * FROMPRODUCTS       DESC(TotaltermsOnHand); " I hope this will help you "