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
How do you get a free ps4
KatRina [158]

Answer:

By having very good luck and winning it in a giveaway!!!

4 0
3 years ago
Read 2 more answers
Assume there are 15 students registered for a history class. You will need to declare an array of the StudentType structure to c
andrezito [222]

Answer:

#include <iostream>

using namespace std;

struct StudentType{

   string studentName;

   int studentId;

}

int n;

char answer[20];

int main(){

   cout<< "Enter the size of the array: ";

   cin >> n;

   StudentType *student = new StudentType(n);

   for (int i = 0; i < n; i++){

       int name;

       int number;

       cin>> name;

       cin >> number;

       student[i].studentName = name;

       student[i].studentId = number;

   }

   for (int i = 0; i < 20; i++){

       cout<< "Enter answers: ";

       cin >> ans;

       answer[i] = ans;

   }

}

Explanation:

The C++ source code has three global variables namely, answer which is an array of character data type, StudentType which is a structure data type and the integer variable n. The main function declares and initializes the dynamic-spaced student array of the structure datatype with the n variable.

3 0
3 years ago
Who is known as the father of computer? ​
juin [17]

Answer:

Charles babbage ok my boy

8 0
3 years ago
Read 2 more answers
What does flexibility look like within your learning? Relevancy of Flexibility: Why is this important to your students?
Yakvenalex [24]

Answer:

just look like I they legs and hope they don't pop off

7 0
3 years ago
What are the benefits of using LinkedIn Sales Navigator?
lutik1710 [3]

Answer:

Well, there are a number of advantages that come with this advanced LinkedIn automation tool. Here are some of the top benefits of a Sales Navigator:

1. Can find and export up to 5000 prospects at a time.

2. Enables you to send 30 InMails per month

3. Easy access Teamlink -enabling you to expand your network by pooling connections

4. Integrate with existing systems

4 0
2 years ago
Other questions:
  • What number is needed to complete the pattern 66, 73, 13, 21, 52,_, 10, 20?
    12·1 answer
  • What kinds of messages can computers read? (CodeHS)
    7·1 answer
  • How many times do you usually use npm?<br> Put your answer in the box.
    6·1 answer
  • What unit is used for measure disk size ?
    10·1 answer
  • What is the term for an element on a Webpage that contains data and procedures for how that item will react when activated
    14·1 answer
  • Describe what is meant by the following:
    14·1 answer
  • Random Access Memory is tempory computer memory that stores works in progress
    7·1 answer
  • Va rog urgent
    8·1 answer
  • Anyone wanna join my giggl?
    11·2 answers
  • Physical and data link layer standards govern transmission in ________. LANs WANs Both LANs and WANs Neither LANs nor WANs
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!