Evaluation Order and Common Problems
Window functions and GROUP BY
Summary and Review


Just as we expected, no window functions are allowed in HAVING. Okay, you know that the remedy is to use a subquery. Try to correct the query on your own. Don't worry if you can't; the hint is there if you need it.


Show the country name and average final auction price for countries that have higher than average final price. Correct the query by using a subquery.

Stuck? Here's a hint!

Instead of AVG(FinalPrice) OVER() at the end, put a small subquery in there. You don't even need a window function; simply calculate the average from all rows.