1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alexgriva [62]
3 years ago
7

Write a SQL statement to display the WarehouseID, the sum of Quantity On Order, and the sum of QuantityOnHand, grouped by Wareho

useID and Quantity Order. Name the sum of QuantityOnOrder and the sum of QuantityOnHand as TotalItemsOnHand. Use only the INVENTORY table in your SQL statement.
Computers and Technology
1 answer:
mariarad [96]3 years ago
3 0

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.
You might be interested in
4. Name and fix the two errors in the following piece of code that is intended to print “Debugging is fun!”. print //(“Debugging
umka2103 [35]
<span>print //(“Debugging is fun!”)


Here the print is a function and // is a parameter that is used to comment section of the code. Any function call must be followed by argument call, which in case here is commented. So, the bug arises. So the correct code will be:

</span>print (“Debugging is fun!”)
3 0
3 years ago
A(n) ____________ is a group of similar or identical computers, connected by a high-speed network, that cooperate to provide ser
scoundrel [369]

Answer:

cluster

Explanation:

A cluster in a computer system is a collection of servers and other resources that work together to provide high reliability and, in certain situations, load balancing and parallel processing.

6 0
2 years ago
What precautions should be taken to make a computer more secure ​
Sergeeva-Olga [200]

Answer:

To make a computer more secure

Explanation:

we have following ways :

1)we should have anti virus to protect our computer.

2)we should not play or look computer for a long time because it destroy our files

4 0
3 years ago
Analyzing computer systems to gather potential legal evidence is computer ________
hodyreva [135]
It is called computer forensics.
5 0
3 years ago
The goal of _______ is to identify and fix as many errors as possible before units are combined into larger software units.
Archy [21]

The goal of <u>unit testing</u>  is to identify and fix as many errors as possible before units are combined into larger software units.

<h3>What are the types of integration testing?</h3>

Some different types of integration testing are big-bang, mixed (sandwich), risky-hardest, top-down, and bottom-up. Other Integration Patterns are: collaboration integration, backbone integration, layer integration, client-server integration, distributed services integration and high-frequency integration.

<h3>Which is integration testing?</h3>

Unit and System testing are various testing levels where the Unit testing is used to test each unit or an individual component of the software application. The integration testing is used only after the functional testing is completed on each module of the application.

To learn more about integration , refer

brainly.com/question/27015819

#SPJ4

6 0
1 year ago
Other questions:
  • Almost all PCs have this type of serial connector
    8·1 answer
  • The following declaration appears in a program: short totalPay, basePay = 500, bonus = 1000; The following statement appears in
    9·1 answer
  • Most Answers MOST ANSWERS
    11·2 answers
  • What operating system uses Fastboot?
    10·2 answers
  • A computer can sort x objects in t seconds, as modeled by the function below:
    5·1 answer
  • When doing black and white photography, which file format should you use if possible? JPEG TIFF PNG RAW
    11·2 answers
  • A wireless networking technician has completed a survey of a wireless network and documented the detected signal strengths in va
    6·1 answer
  • Explain the difference between invention and innovation?
    13·1 answer
  • Write a recursive function is_pow2(n) that returns True if the positive integer n is an integer power of 2, and False otherwise.
    9·1 answer
  • Can anyone help explain this?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!