Introduction
Simple OVER()
PARTITION BY
14. PARTITION BY – Exercise 4
Ranking functions
Window Frames
Analytic Functions
PARTITION BY ORDER BY
Order of Evaluation
Finished!

Instruction

Awesome! Let's do the last exercise for PARTITION BY.

Exercise

For each customer, show the following information: their FirstName and LastName, the average PaymentAmount from single rentals by that customer, and the average PaymentAmount from single rentals for all customers from the same country. Name the columns AvgPaymentAmount and CountryAvgPaymentAmount.

Stuck? Here's a hint!

You will need to join two tables: SingleRental and Customer.