Answer:
I think, Every year, thousands of people die as a result of workplace injuries.
Explanation:
Complete the sentence with the words below stop push direction slow down move shape speed up pull A force is a. or a.
Answer:
he just regrets that he made a monster and deeply feels guilty that it is in pain of reliving
Explanation:
Answer:
Google became successful because its founders were well-connected. Google was the world's first and best search engine. Google changed the world by solving an old problem in a new way. Google's other products are now more important to its success than search.
Explanation:
Answer:
The corrected question is:
Write an SQL statement to display the WarehouseID, the sum of QuantityOnOrder and sum of QuantityOnHand, grouped by WarehouseID and QuantityOnOrder. Name the sum of QuantityOnOrder as TotalItemsOnOrder and the sum of QuantityOnHand as TotalItemsOnHand. Use only the INVENTORY table in your SQL statement.
Answer to this corrected question:
SELECT WarehouseID,
SUM(QuantityOnOrder) AS TotalItemsOnOrder,
SUM(QuantityOnHand) AS TotalItemsOnHand
FROM INVENTORY
GROUP BY WarehouseID, QuantityOnOrder;
According to the given question:
SELECT WarehouseID,
SUM(QuantityOnOrder) + SUM(QuantityOnHand) AS TotalItemsOnHand
FROM INVENTORY
GROUP BY WarehouseID, QuantityOnOrder;
Explanation:
- In the SQL statement SELECT statement is used to select the data from the table. Here the SELECT statement is used to select WarehouseID, Sum of the columns QuantityOnOrder and QuantityOnHand from INVENTORY table.
- The sum of QuantityOnOrder and QuantityOnHand columns are given the name of TotalItemsonHand (In case of the corrected question the sum of column QuantityOnOrder is named as TotalItemsOnOrder and the column QuantityOnHand is named as TotalItemsOnHand
) using Alias AS. Alias is the temporary name given to the columns or table to make them more readable.
- GROUP BY statement is used to arrange or "group" same data and is often use with aggregate functions like SUM function here. So the grouping here is done based on two columns WarehouseID and QuantityOnOrder.
- SUM function in this SQL statement is an aggregate function to calculate the sum of all value in the columns QuantityOnOrder and QuantityOnHand.