WITH ranked_players AS (
SELECT
season,
player_id,
player,
pts_per_game,
g,
ROW_NUMBER() OVER (
PARTITION BY season
ORDER BY pts_per_game DESC
) AS rn
FROM @kaggle.sumitrodatta_nba_aba_baa_stats.player_per_game
)
SELECT
season,
SUM(pts_per_game * g) AS combined_points_top_10
FROM ranked_players
WHERE rn <= 10 and season>2000 and season<2025
GROUP BY season
ORDER BY season;