Write a SQL statement to display the SKU, Description, for all products that have a QuantityOnHand value equal to 0 and a QuantityOnOrder value greater than 0. Explain what useful information this statement provides for the business.

Respuesta :

Answer:

SELECT SKU, SKU_Description

FROM INVENTORY

WHERE QuantityOnHand =0

AND QuantityOnOrder > 0;

Explanation:

Here SELECT statement is used to select SKU and SKU_Description from Inventory table. WHERE clause is basically used to check a condition. Those records are selected from the Inventory table in which the QuantityOnHand is equal to 0 and QuantityOnOrder is greater than 0. AND here is used to specify that both the conditions QuantityOnHand =0  and QuantityOnOrder > 0 should hold.

SKU stands for stock keeping unit which is used to track the Inventory and to search stock from the database or tables.  QuantityOnHand is basically the total number of available items except for the items that are already taken for the sale order and QuantityOnOrder is how many items ordered from the supplier. This will help to provide information about which items are not in the warehouse currently and knowing quantity on order is important for business to so that the duplicate orders of same items can be avoided.