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

Instruction

Ok! Let's do the last exercise.

Exercise

For each single rental, show the following information: RentalDate, Title, Genre, PaymentAmount, and the highest PaymentAmount for any movie in the same Genre rented from the first day up to the current RentalDate. Name the column CurrentMaxAmount.

Stuck? Here's a hint!

You will need to use PARTITION BY to group rentals by Genre and ORDER BY to sort them by RentalDate. Join the tables Movie and SingleRental.