How would you use window functions to rank players by performance over time on PrizePicks?
Use the provided PrizePicks player, game, and performance data. Return rankings only after a player has three valid completed-game performances.
Output
- One row per eligible player and completed game, with
player_id, player_name, sport, game_date, performance_score, rolling_3_game_avg, prior_performance, performance_change, and performance_rank.
- Rank players within the same sport and game date by rolling average, with ties sharing a rank.
- Order by
sport, game_date, performance_rank, and player_id.