End of Summer - hours only!Up to 80% off on all courses and bundles.-Close
When window functions are evaluated
Window functions and GROUP BY


Fine. Let's do one more exercise of this kind.


Group the auctions based on the day they ended and show the following columns: ended, the average number of views from auctions on that day and the ranking based on that average (the highest average should get the rank of 1).

Stuck? Here's a hint!

Use RANK() OVER(ORDER BY AVG(views) DESC as your window function.