Rank users by age within their region, oldest first (rank 1 is the oldest). When two users have the same age they share a rank, and the next rank is skipped (1, 2, 2, 4), as in sports standings.
Write a query returning name, region, age and the rank as age_rank, using the RANK() window function.
name, region, age, age_rankRANK() OVER (PARTITION BY ... ORDER BY ...)
PARTITION BY region restarts the ranking per region; ORDER BY age DESC puts the oldest first.
No results yet
Run your code to check it against the examples, or submit to run every test.