Question: Write a query to display the total inventorythat is, the sum of all products on hand for each brand ID. Sort the output by brand

Write a query to display the total inventory—that is, the sum of all products on hand for each brand ID. Sort the output by brand ID in descending order (Figure P7.37).

Figure P7.37 Total Inventory of Each Brand of Products BRAND_ID TOTALINVENTORY 35 33 31 30 29 28 27 25 23

Figure P7.37 Total Inventory of Each Brand of Products BRAND_ID TOTALINVENTORY 35 33 31 30 29 28 27 25 23 2431 2158 1117 3012 1735 2200 2596 1829 1293

Step by Step Solution

3.44 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

SELECT brandid SUMonhand AS totalinventory FROM products GROUP BY brand... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Database Systems Design Implementation Questions!