Answer:
run the code to see where the error is
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.
<span>I feel that this is true. With the invention of the automobile citizens were able to start mobilizing and moving from place to place. This then started the process of urbanization and the expansion of multi million dollar corporations.</span>
Being kind to others makes a significant impact on your life and the people you are being kind towards. Kindness puts a smile on other peoples faces, and the world without it would be very different. Even though their are a lot of people who are not kind throughout this world, if kindness was outlawed, their would still be a significant impact on our earth as it is today. For example, it would change the way people do business and it would be much harder to socialize. Kindness is way more important than we make it out to be. Their is always an opportunity to be kind wherever you are. Whether you’re online, next to someone, or just walking down a street, you can always find a chance to be kind if you really try.
Answer:
Database Management Software.
Explanation:
The software that provides the mechanism to access the database is called Database Management Software.There are two types databases SQL and No SQL.There are various types of database Management Software present online for ex:-My SQL,Microsoft SQL server,Microsoft Access,Postgres SQL,Mongo DB etc.