Baselight
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;
seasoncombined_points_top_10
200120402.199999999997
200217196.600000000002
200319052.1
200416491.3
200518086.700000000004
200622454.2
200717051.100000000002
200818710.2
200918275.300000000003
201019415.800000000003
201118150.2
201213313.9
201318425.699999999997
201419458.2
201514928.599999999999
201619406.499999999996
201720571.9
201818260.3
201918893.700000000004
202016947.3
202116449.7
202217912
202318274.399999999998
202419710.2

Share link

Anyone who has the link will be able to view this.