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.

Console

Code editor

Result

TableConsole