Introduction
Quick refresher
PARTITION BY ORDER BY with ranking
PARTITION BY ORDER BY with window frames
PARTITION BY ORDER BY with analytical functions
19. Practice 2
Revision

Instruction

Fine! One more exercise and we'll move on.

Exercise

For each row, show the following columns: store_id, day, customers and the number of clients in the 5th greatest store in terms of the number of customers on that day.

Stuck? Here's a hint!

Remember that the query will only work correctly if you use ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING.

Code editor

TableConsole