![subject](/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.
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 22:00
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 14:30
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 16:50
Ideally, the backrest is tilted back slightly, so when you turn the wheel your shoulders are the seat.
Answers: 2
You know the right answer?
Write a SELECT statement that uses the OVER clause to return the sum and average of all order items...
Questions
![question](/tpl/images/cats/mat.png)
Mathematics, 16.10.2020 05:01
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 16.10.2020 05:01
![question](/tpl/images/cats/pravo.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 16.10.2020 05:01
![question](/tpl/images/cats/istoriya.png)
History, 16.10.2020 05:01
![question](/tpl/images/cats/mat.png)
Mathematics, 16.10.2020 05:01
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 16.10.2020 05:01
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 16.10.2020 05:01
![question](/tpl/images/cats/istoriya.png)
History, 16.10.2020 05:01