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

Instruction

Okay, this is the last ranking exercise.

Exercise

For each single rental, show the RentalDate, the Title of the movie rented, its Genre, the PaymentAmount and the rank of the rental in terms of the price paid (the most expensive rental should have Rank = 1). The ranking should be created separately for each movie Genre. Allow the same rank for multiple rows and allow gaps in the numbering too.

Stuck? Here's a hint!

You'll need to join two tables: Movie and SingleRental. Partition the rows by Genre, but sort them by PaymentAmount in descending order.