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
SVETLANKA909090 [29]
3 years ago
13

Write a SELECT statement that uses an aggregate window function to get the total amount of each order. Return these columns: The

order_id column from the Order_Items table The total amount for each order item in the Order_Items table (Hint: You can calculate the total amount by subtracting the discount amount from the item price and then multiplying it by the quantity) The total amount for each order Sort the result set in ascending sequence by the order_id column.
Computers and Technology
1 answer:
Reika [66]3 years ago
8 0

<u>Answer alongwith Explanation:</u>

The following is the statement that uses an aggregate window function in order to get the total amount of each order.

SELECT isnull(p1.PName,'Total') As PName,

              Sum((t1.Price minus  t1.Discount ) multiply with Quantity) AS <u>TotalAmount </u>

FROM     Products AS t1

              JOIN OrderItems AS t2

              ON t1.ProductID = t2.ProductID

GROUP  BY Rollup(PName) ORDER BY order id ASC

Thus, it can be used for the function.

You might be interested in
A spreadsheet contains the maximum weight and maximum height for fifty dog breeds. The breeds are located in rows, and the weigh
MrRa [10]

Answer:

a. Locate

Explanation:

Question options (obtained on the net):

a. Locate

b. Sort

c. Filter

d. Replace

Explanation:

The largest value of the weights of the dog breed in row 43 is the maximum weight of the dog breed in the row

The 'MAX' formula or the 'Autosum' tool can be used to give the largest value in a row, or column

To locate the maximum value in MS Excel, the ADDRESS and MATCH and MAX functions are combined and entered into the blank cell on the right, specifying the same range for the MAX and MATCH functions, and a '0' for the MATCH function as well as a '1' for the ADDRESS function as follows;

=ADDRESS(MATCH(MAX(A1:E1), A1:E1, 0), 1)

Therefore, to navigate to the maximum weight, Emily should use a <em>locate</em>(ing) tool navigate to the information on the spread sheet

8 0
3 years ago
Which electronic community allows you to write a message and send it to several people at the same time?
Fynjy0 [20]
Email would be the answer youre looking for.Hope this helps!!
7 0
4 years ago
Read 2 more answers
Hardware is defined as the physical parts of a computer.
love history [14]

Answer:

Computer hardware includes the physical parts of a computer, such as the case, central processing unit (CPU), monitor, mouse, keyboard, computer data storage, graphics card, sound card, speakers and motherboard.

3 0
3 years ago
Read 2 more answers
A speaker says:
vichka [17]

Answer:

B)

Explanation:

8 0
3 years ago
How to delay sending an email in office 365
expeople1 [14]
You can’t it’s impossible unless your a hackers
3 0
3 years ago
Other questions:
  • A(n) _____ of an class is where the services or behaviors of the class is defined. (Points : 6) operation
    6·1 answer
  • Do you believe that OOP should be phased out and we should start working on some alternative(s)?
    6·1 answer
  • For a class project, Jerome builds a simple circuit with a battery and three light bulbs. On his way to school, Jerome drops his
    9·1 answer
  • Please find one organization that has recently adopted virtualization and summarize their reasons for taking this approach. What
    12·1 answer
  • What is the gear ratios of a gear train with an input gear of 48 teeth and an output gear of 12?
    15·2 answers
  • First time using this site so be mindful if I make any mistakes
    6·1 answer
  • Which one Bc I’m struggling
    11·2 answers
  • Write a function that takes a list and returns its first element​
    15·1 answer
  • I<br> What is a Watermark?
    9·2 answers
  • Which line of code will use the overloaded division operation?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!