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
Convert 578.2 into hexadecimal​
siniylev [52]
The answer is 243. Hope it helps
5 0
3 years ago
Why is John Von Neumann to a remarkable name?<br>si​
Black_prince [1.1K]

Answer:

John von Neumann is remarkable for his vast knowledge of mathematics, and the sciences as well as his ability to correlate the pure and applied sciences.

Explanation:

John von Neumann who was born on December 28 1903, and died on February 8,1957 was known for his extensive knowledge of mathematics, physics, computer, economics, and statistics. In computing, he was known to conceive the idea of the self-replicating machines that thrive in the automata cellular environment, the von Neumann architecture, stochastic computing and linear programming.

He developed the game theory in Economics, and laid the foundation for several mathematical theories. He contributed greatly to quantum mechanics and quantum physics. Little wonder, he was dubbed "the last representative of the great mathematicians."

8 0
3 years ago
On laptops with a smart card reader installed, where is the smart card reader usually located?
dem82 [27]
Plenty of space in the palm rest
4 0
3 years ago
List five things that could cause premature bearing failure
Wewaii [24]
Smoking, Drinking, Use of drugs, problems with uterus, Problems with cervix or placenta.


6 0
3 years ago
One or more access points positioned on a ceiling, wall, or other strategic spot in a public place to provide maximum wireless c
Lera25 [3.4K]

Answer:

hotspots.

Explanation:

Hotspots is a small geographical location with at least one access point in an outdoor/indoor setting, that provide people with maximum wireless coverage within that area and its mostly uses a wireless local-area network (WLAN) using a router to connect to an Internet service provider.

7 0
3 years ago
Other questions:
  • The PICC team is scheduled to remove a PICC before client discharge. Assessment of the catheter indicates the PICC and determine
    7·1 answer
  • Liquid water can change into a gas and become part of the air. When water is a gas, what is it called?
    7·1 answer
  • What is text box and label control​
    10·2 answers
  • The ash and dust from a volcanic eruption can cause a ______ change in the environment.
    8·1 answer
  • Which option on the Format tab is used to modify particular portions of the chart?
    12·1 answer
  • What is the missing line of code?
    10·2 answers
  • Answer for 5,6,7 any one know plz
    8·1 answer
  • Create One print command in LOGO​
    12·1 answer
  • Please help me asapppp!​
    8·2 answers
  • Const x = 0;
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!