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
When the national economy goes from bad to better, market research shows changes in the sales at various types of restaurants. P
zhannawk [14.2K]

Answer: it will be greater by $2.6 billion

Explanation:

7 0
3 years ago
TRUE OR FALSE!!!!!
KatRina [158]

Answer:

True

Explanation:

Using CCleaner, it's revealed that there are trackers within "secure" websites/apps such as Google and Tiktok. The manufacturer(s) of these websites/apps can share your information with whoever they're working with. Since people often look past the terms and conditions when installing an app and or program, they don't see that companies can easily retrieve all of your data within a couple clicks.

6 0
3 years ago
What is Sleep mode? Check all of the boxes that apply.
9966 [12]

It is a power-saving mode for a computer.

It is a power-saving mode designed for laptops.

6 0
3 years ago
Send the memes whoever is the best will get that crown thing lol
shutvik [7]
I have to type 20 characters here so...

4 0
3 years ago
Read 2 more answers
When you try to boot your computer it hangs after post?
Likurg_2 [28]
What are you trying to ask...
4 0
3 years ago
Other questions:
  • The main characteristic of ____ is that its source code is published with the software.
    7·1 answer
  • Define a function CoordTransform() that transforms its first two input parameters xVal and yVal into two output parameters xValN
    7·2 answers
  • Which is the correct sequence of steps for opening a new document?
    10·2 answers
  • What is the typical educational requirement for a non-entry level software programmer?
    8·2 answers
  • True/False
    13·1 answer
  • Jamey did a lot of research on his paper topic but can't figure out where to start writing. He has a loose plan in mind, but it'
    9·2 answers
  • Karen is designing a website for her uncle's landscaping business. She wants to ensure that it's engaging and provides a lot of
    5·1 answer
  • Here is the problem specification: An Internet service provider has three different subscription packages for its customers: Pac
    5·1 answer
  • ...This is totally a question
    6·1 answer
  • In C++ we can print message for the user in Arabic?<br><br> A. True<br> B. False
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!