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 using presentation aids A. make the aid available for the audience to look at throughout the speech. B. prepare to give you
DanielleElmas [232]

Answer: options A and B.

Option A, make the aid available for the audience to look at throughout the speech.

Option B, prepare to give your presentation without the aids, incase problem arises.

Explanation:

Presentation aids, sometimes also called sensory aids, are the resources beyond the speech itself that a speaker uses to enhance the message conveyed to the audience.

The type of presentation aids that speakers mostly make use of are visual aids; pictures, diagrams, charts and graphs, maps... Audible aids (musical excerpt, sound effects) and olfactory aids (fragrance samples or food samples) are also used.

* Presentation aids can be used throughout the speech but it should be used for essential points so as to to tire or bore the audience.

* Ensure presentation still works without the presentation aids in case of technical problems or if any problem arises at all.

* While explaining the aids, focus should be on the audience and not the presentation aids itself.

* Practice should be done with the presentation aids in advance so as to avoid any error while presenting.

Therefore, options A, B should be done when using presentation aids.

6 0
3 years ago
If you have defined a class named SavingsAccount with a public static data member named numberOfAccounts, and created a SavingsA
Anvisha [2.4K]

Answer:

numAccounts = SavingsAccount.numberOfAccounts

Explanation:

In object oriented programming, when you have created an object of class, you can create several instances (objects) from that class by referencing the className.classFeild. In this instance SavingsAccount is the class name and

numberOfAccounts is a feild (or data member). to create a new numAccount, we use the syntax as above in the answer

3 0
3 years ago
Write a program that asks the user to enter a birth year. the program should then indicate which generation a person of that yea
USPshnik [31]
Something like the following. Also you need to give what language you are using. Anyways, you should be able to convert this to your language of choice. 

<script type="text/javascript">
function checkGeneration() { 
   var gen = ["Baby Boomer ","Generation X","Xennials","Generation Y"];
   var reversestr = "";
   var getyear = window.prompt("Enter a 3 digit number: ");
    if (parseInt(getyear) <= 1964) {
        alert(gen[0]);   
    } else if(parseInt(getyear) <= 1979) {
        alert(gen[1]);
    } else if(parseInt(getyear) <= 1985) {
        alert(gen[2]);               
   }  else if(parseInt(getyear) <= 1995) {
        alert(gen[3]);
   }
 }
checkGeneration();
</script>
7 0
3 years ago
Software (often on firmware) designed to make physical products and devices "smarter" by doing things like sharing usage informa
kolezko [41]

Answer:

embedded system

Explanation:

Based on the scenario being described within the question it can be said that the type of software that is being described is known as an embedded system. This is actually a combination of both hardware and software that focuses on a specific function which is later implemented into a much larger system to allow it to become "smarter", by performing more complex tasks, which would otherwise not be possible.

5 0
3 years ago
I’m joining the robotics team in my school, but my knowledge is pretty basic. What should I do to improve myself?
Aleonysh [2.5K]
Start learning the functions of a computer and really put ur heart into it
8 0
3 years ago
Other questions:
  • When doing a complex presentation, which of the following would be the best tool to begin designing your presentation?
    11·2 answers
  • What is tuple and attribute of a relation​
    11·1 answer
  • You have found statistics on the Internet that you would like to use in your speech.
    6·1 answer
  • When you collaborate or meet with a person or group online, it is called
    12·2 answers
  • Which of the following would an interactive media professional most likely need? A.a high school diploma
    15·1 answer
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • Fill up the blank:- The picture that graphically represents the items you use in Windows is called a/an .......
    5·1 answer
  • 6.16 LAB: Find largest number (EO) Write a method, findMax(), that repeatedly reads in integers until a negative integer is read
    9·1 answer
  • What are the main types of database end users,? Discuss the main activi-ties of each
    10·1 answer
  • What the difference between an operating system drive and a storage drive?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!