Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Simple OVER()
10. OVER() – Exercise 3
PARTITION BY
Ranking functions
Window Frames
Analytic Functions
PARTITION BY ORDER BY
Order of Evaluation
Finished!

Instruction

That's it! The last exercise in this section is waiting.

Exercise

For each single rental, show the Id, RentalPeriod, PaymentAmount, the average amount paid from all the single rentals, and the ratio of PaymentAmount to the average amount paid. Name the last two columns AvgPaymentAmount and Ratio.

Stuck? Here's a hint!

Use AVG() as the aggregate function. In the last column, apply division.