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
Select the variable that illustrates the ratio scale of measurement. (a) gender (b) weight (c) political party affiliation (c) r
skad [1K]

Answer: (b) weight, ratings of your supervisor

Explanation:

Ratio scale is quantitative in nature.and a type of variable measurement. It enables anyone to compare intervals or differences. It is the 4th level of measurement and possesses a zero point.

The weight of a person can be expressed as less between 50 - 60 kgs which is why it  represents a scale of values and considered as ratio scale. Similarly the ratings of supervisor can be in scale of 10. It could be something between 6-10.

However for gender and party affiliation there are one options or limited and it cannot be expressed something in between ranges. So they are not considered ratio scale.

ratio scale of measurements do not have negative values.

3 0
3 years ago
Identify a true statement of a JavaScript program in a web form.
zalisa [80]

Answer:

The answer is option(a).

Explanation:

JavaScript is a language for client scripting, that is used to generate web pages. This language is developed for a standalone platform like Netscape. It is used to create a dynamic web page as well as to add some new effects to websites. The JavaScript can be moved on to the CGI system on a web page and the JavaScript code involving the necessary data may be returned by a CGI program. and other options are not correct that can be defined as:

  • In option b, JavaScript is not a closed-source programming language.
  • In option c, It is not configured for actuators engines.
  • In option d, It is not a bug-free language.
7 0
3 years ago
Can anyone fill in the space please
Anton [14]
The answer is the stove which has and pressure
8 0
4 years ago
A firewall is either software or dedicated hardware that exists between the __________ being protected.
Lapatulllka [165]

A firewall is either software or dedicated hardware that exists between the network and the resource being protected. this network security device monitors traffic to or from the network. It is based on set of rules about what data packets will be allowed to enter or leave a network.

5 0
3 years ago
computer has a 32-bit instruction word broken into fields as follows: opcode, six bits; two register file address fields, five b
lina2011 [118]

Answer:

a.  2^6, or 64 opcodes.

b.  2^5, or 32 registers.

c. 2^16, or 0 to 65536.

d.  -32768 to 32768.

Explanation:

a. Following that the opcode is 6 bits, it is generally known that the maximum number of opcodes should be 2^6, or 64 opcodes.

b. Now, since the size of the register field is 5 bits, we know that 2^5 registers can be accessed, or 32 registers.

c. Unsigned immediate operand applies to the plus/minus sign of the number. Since unsigned numbers are always positive, the range is from 0 to 2^16, or 0 to 65536.

d. Considering that the signed operands can be negative, they need a 16'th bit for the sign and 15 bits for the number. This means there are 2 * (2^15) numbers, or 2^16. However, the numbers range from -32768 to 32768.

6 0
4 years ago
Other questions:
  • What is the role of the ieee in computer networking and wireless communications?
    14·1 answer
  • When you use the Bing Image Search for online pictures, you will be searching the Internet for pictures that have been filtered
    13·2 answers
  • List three components of a computer system​
    10·1 answer
  • Explain the difference between good and bad table structures. How do you recognize the difference between good and bad structure
    14·1 answer
  • What is this car first to awnser is the brianliest
    5·2 answers
  • Which componet is the smallest unit in a spreadsheet
    15·1 answer
  • William created a spreadsheet and he would like to enter the data he collected. What information should he put in the first row?
    15·1 answer
  • 7 TH GRADE QUESTION...PLS HELP
    12·2 answers
  • What kind of charger can i use for this
    10·2 answers
  • How to add up multiple user inputs for example: If i ask the user How many numbers do you want to add? they say 5 then i out put
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!