#810

Tell each player what percentile they're in

On the leaderboard we display «you're in the top X%» — that's the player's percentile rank relative to everyone else, a number from 0 to 1. For every player compute their percentile rank and round to four decimal places. With ties on score the ranks must be deterministic — so the score sort needs a second level by player id. Sort by score descending; ties broken by player id.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

prscoreplayer_id
0.0000951
0.1111882
0.2222883

Your query result will appear here