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
Develop a C program that calculates the final score and the average score for a student from his/her (1)class participation, (2)
White raven [17]

Answer:

Following are the code to the given question:

#include<iostream>//defining header file

using namespace std;

int main()//defining main method

{

float clspat,test,asst,exam,practice,total,average;//defining floating variable

char name[100];//defining char variable to input value

cout<<"Enter Name of Student: ";//print message

cin>>name; //input value

cout<<"Enter scores in following scoring items between 0 and 100:"<<"\n";//print message

cout<<"Enter class participation score: ";//print message

cin>>clspat;//input value

cout<<"Enter test score: ";//print message

cin>>test;//input value

cout<<"Enter assignment score: ";//print message

cin>>asst;//input value

cout<<"Enter exam score: ";//print message

cin>>exam;//input value

cout<<"Enter practice score: ";//print message

cin>>practice;//input value

total=clspat+test+asst+exam+practice;//calculating total value

average=total/5;//calculating average value

cout<<endl<<"SCORE CARD OF "<<name<<"\n"<<"-----------------------"<<"\n";//print value with message

cout<<"Total score: "<<total<<"\n";//print message with value

cout<<"Average score: "<<average; //print message with value

}

Output:

please find the attached file.

Explanation:

In this code, the floating-point variable is declared, which is used for input value from the user-end and after input the floating-point value it uses the "total, average" variable to calculate its respective values and store its value with init, after storing the value into the variable it uses the print method to print its values.

5 0
3 years ago
Why are streak plates used to test minerals?
Sphinxa [80]

A. Small impurities can cause big changes in the color of a mineral.

5 0
3 years ago
Intuit, a tax and financial planning software company, creates a website where its QuickBooks customers can interact about probl
andrey2020 [161]

Answer:

Digitalization

Explanation:

Instead of doing it manually they created one web site to interact with the customers through Internet and computer. so it is an example of digitalization where user avoids manual interaction

8 0
3 years ago
Ethernet use a contention-based media access method defined by the IEEE 802.3 standards called ___ .
egoroff_w [7]

off the top of my head I think this might be (CSMA/CD)

4 0
3 years ago
You are the leader of your school's Go Green Club, which supports environmentally friendly choices and lifestyles. Your club wil
miskamm [114]

Answer:

(Answers may vary.)

My Considerations

The Go Green Club has a total of 100 members. I plan to photograph each of them in front of our club's "Go Green" sign. I have a deadline of 30 days to deliver the ID cards. Therefore, I have to ensure that all the cards are printed and ready for delivery in 20 days, with 10 days of buffer time (in case the cards require any edits or changes). Additionally, after I have submitted the draft for review, I will need the coordinator's final approval on the design and layout of the ID card.

Hardware Requirements

  • a desktop computer or laptop with adequate memory to run the software to create the ID cards
  • some external storage devices, such as pen drives and DVD disks, to share the design and layout for the coordinator to review; I will also need these devices to store the final digital file for print
  • a color scanner to scan hand-drawn artwork and signatures, which I will place on the ID card
  • a digital camera to capture photos of members, and to transfer them to the computer/laptop
  • a printer to make hard copies of the cards.
  • Software Requirements

I intend to use Scribus to create the ID cards because it is a free DTP application, and has most of the common features I'd need to create an ID card.

Formatting Techniques

  • I plan to use the following techniques to design the club ID cards.
  • I'll use the landscape or horizontal orientation. This will enable proper spacing for the ID card elements.
  • I'm planning to use a card measuring 3.370 inches × 2.125 inches. A card this size will ensure that all the elements of the card are visible.
  • I am planning to place the club logo on the top left corner, because the eye normally follows the path of the letter Z. This'll help the viewer to see the logo and identify/recognize the club.
  • Next I'll place the club name; I'll use the top-center alignment and also vertically align it to the logo. I'll use the sans serif font for the club name.
  • Following the Z-path rule, I'll place the member's photo to the right and the member's name under the photo. In this position, the photo and the name will be visible, and will not get mixed up with other elements. I'll print the member name with a serif font.
  • Finally, again in line with the Z-path rule, I'll position the club seal and the club director's signature at the right lower bottom. Although these elements are essential on an ID card, they do not require as much viewer attention as the club logo, name, and member photo.

Explanation:

I used Canva for this card.

8 0
3 years ago
Other questions:
  • Please help!
    6·2 answers
  • The equipment that processes data in order to create information is called the _______.
    8·2 answers
  • Assume that the array monthSales of integers has already been declared and that its elements contain sales data for the 12 month
    13·1 answer
  • Define and test a function myRange. This function should behave like Python’s standard range function, with the required and opt
    13·2 answers
  • Who was eqvtime tayaishvili?​
    13·2 answers
  • PREDATION AND EVOLUTION
    12·1 answer
  • A ______ is a computer that controls access to the hardware, software, and other resources on a network. mainframe server workst
    10·1 answer
  • Select each task that may be completed using a word processor.
    8·2 answers
  • 10 points!
    12·1 answer
  • Select the correct answer.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!