![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 04.03.2021 20:40, elisaalonso8805
Write a SELECT statement that uses the OVER clause to return the sum and average of all order items final prices (ItemPrice minus DiscountAmount) and a count of all the order items. Partition the OVER clause by OrderDate from the Orders table for the sum, average, and count. Also include the product name, orderdate, and the final price for each item (without aggregation) using the formula (ItemPrice minus DiscountAmount). The select statement should include the following columns in the order below:
The ProductName column from the Products table.
The OrderDate column from the Orders table.
A calculated column with alias "ItemSalesPrice" which is calculated as follows: ItemPrice minus the DiscountAmount from the OrderItems table.
OVER clause: sum of the ItemPrice minus the DiscountAmount from the OrderItems table partitioned by the OrderDate from the Orders table. Use alias "TotalSalesOnDate" for the calculated column.
OVER clause: average of the ItemPrice minus the DiscountAmount from the OrderItems table partitioned by the OrderDate from the Orders table. Use alias "AvgSalesOnDate" for the calculated column.
OVER clause: count of the ItemPrice from the OrderItems table partitioned by the OrderDate from the Orders table. Use alias "TotalItemsSoldOnDate" for the calculated column.
Sort the result set in ascending sequence by OrderDate and ProductName.
![answer](/tpl/images/cats/otvet.png)
Answers: 2
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 14:10, normarismendoza
Dean wants a quick way to look up staff members by their staff id. in cell q3, nest the existing vlookup function in an iferror function. if the vlookup function returns an error result, the text “invalid staff id” should be displayed by the formula. (hint: you can test that this formula is working by changing the value in cell q2 to 0, but remember to set the value of cell q2 back to 1036 when the testing is complete.)
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 16:00, lokaranjan5736
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
Do you know the correct answer?
Write a SELECT statement that uses the OVER clause to return the sum and average of all order items...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.09.2020 02:01
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.09.2020 02:01
![Konu](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 10.09.2020 02:01
![Konu](/tpl/images/cats/en.png)
English, 10.09.2020 02:01
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.09.2020 03:01
![Konu](/tpl/images/cats/obshestvoznanie.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 10.09.2020 03:01
![Konu](/tpl/images/cats/obshestvoznanie.png)
![Konu](/tpl/images/cats/istoriya.png)
History, 10.09.2020 03:01