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

Instruction

That's it. Let's do the last exercise in PARTITION BY.

Exercise

For each customer, show the following information: first_name, last_name, the average payment_amount from single rentals by that customer and the average payment_amount from single rentals by any customer from the same country.

Stuck? Here's a hint!

You will need to join two tables: single_rental and customer. Remember to use DISTINCT.