National Basketball Association nba

Seasons
1996-97–2026-27
from nba reads
nba.player_games
Tables
14 tables
Positions
PG Point guard · SG Shooting guard · SF Small forward · PF Power forward · C Center · G Guard · F Forward

nba.players Player seasons (league)

One row per player per season since 1996-97 — the league's own dashboards, with the plus-minus models beside them.

from nba.players
select player, team, games, pts, reb, ast, ts_pct, usg_pct, net_rating
order by pts desc
limit 100
One row is
one player's season (player-season)
Built from
one table, read straight
Reads
nba_player_seasons NBA Stats, hoopR
Shows by default
player team games pts reb ast ts_pct usg_pct net_rating
Ordered by
pts desc
Rows
100 by default, 5000 at most
Ranks within
season
Careers counted in
seasons
Biggest row
pts

Applied unless you say otherwise

  • Limited to the regular season — add where season_type = Playoffs to change it.

Before you trust the numbers

  • The league's own season totals, not a roll-up of his games — an advanced rate here is the season's, not a mean of nightly ones.
  • A traded player is one row, for the whole season; clubs says how many he played for, and nba.player_team_seasons splits it.
  • RAPM, BPM, WAR and DARKO are a model fitted over the league's possessions, not figures the NBA publishes.
Dimensions 5
NameBound to
league always nba
team the team column
player the player column
position the position column
season the season column
Columns 78
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) top(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
season_type completes season_type Type string
dimension

Whether the game was a regular-season, play-in or playoff game.

Regular Season, Playoffs or PlayIn

What it takes
  • folds: count(season_type) distinct(season_type) only(season_type) latest(season_type) top(season_type) mode(season_type)
NBA Stats · hoopR
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) top(player) mode(player)
NBA Stats · hoopR
team completes team Team string
dimension

The club.

The club he finished the season at — clubs says whether there were others

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) top(team) mode(team)
NBA Stats · hoopR
clubs #Clubs integer
measure

How many clubs he played for that season.

How many clubs he played for that season

What it takes
  • folds: sum(clubs) avg(clubs) min(clubs) max(clubs) count(clubs) distinct(clubs) only(clubs) latest(clubs) top(clubs) mean(clubs) median(clubs) mode(clubs)
  • ranks: clubs_percentile
  • accumulates: as_of(clubs)
  • can be a benchmark
NBA Stats · hoopR
position completes position Pos string
dimension

The position he started at.

What it takes
  • folds: count(position) distinct(position) only(position) latest(position) top(position) mode(position)
NBA Stats · hoopR
age Age integer
measure

His age that season.

What it takes
  • folds: sum(age) avg(age) min(age) max(age) count(age) distinct(age) only(age) latest(age) top(age) mean(age) median(age) mode(age)
  • ranks: age_percentile
  • accumulates: as_of(age)
  • can be a benchmark
NBA Stats · hoopR
college College string
dimension

Where he played before the NBA.

What it takes
  • folds: count(college) distinct(college) only(college) latest(college) top(college) mode(college)
NBA Stats · hoopR
country completes country Ctry string
dimension

The country he is listed as from.

What it takes
  • folds: count(country) distinct(country) only(country) latest(country) top(country) mode(country)
NBA Stats · hoopR
height_inches Ht integer
measure

Height in inches.

Height in inches

What it takes
  • folds: sum(height_inches) avg(height_inches) min(height_inches) max(height_inches) count(height_inches) distinct(height_inches) only(height_inches) latest(height_inches) top(height_inches) mean(height_inches) median(height_inches) mode(height_inches)
  • ranks: height_inches_percentile
  • accumulates: as_of(height_inches)
  • can be a benchmark
NBA Stats · hoopR
weight_lb Wt integer
measure

Weight in pounds.

What it takes
  • folds: sum(weight_lb) avg(weight_lb) min(weight_lb) max(weight_lb) count(weight_lb) distinct(weight_lb) only(weight_lb) latest(weight_lb) top(weight_lb) mean(weight_lb) median(weight_lb) mode(weight_lb)
  • ranks: weight_lb_percentile
  • accumulates: as_of(weight_lb)
  • can be a benchmark
NBA Stats · hoopR
experience Exp integer
measure

Seasons of NBA experience before this one.

Seasons of NBA experience

What it takes
  • folds: sum(experience) avg(experience) min(experience) max(experience) count(experience) distinct(experience) only(experience) latest(experience) top(experience) mean(experience) median(experience) mode(experience)
  • ranks: experience_percentile
  • accumulates: as_of(experience)
  • can be a benchmark
NBA Stats · hoopR
games GP integer
measure

Games he played in. NBA.com

What it takes
  • folds: sum(games) avg(games) min(games) max(games) count(games) distinct(games) only(games) latest(games) top(games) mean(games) median(games) mode(games)
  • ranks: games_percentile
  • accumulates: as_of(games)
  • can be a benchmark
NBA Stats · hoopR
wins W integer
measure

Wins.

What it takes
  • folds: sum(wins) avg(wins) min(wins) max(wins) count(wins) distinct(wins) only(wins) latest(wins) top(wins) mean(wins) median(wins) mode(wins)
  • ranks: wins_percentile
  • accumulates: as_of(wins)
  • can be a benchmark
NBA Stats · hoopR
losses lower is better L integer
measure

Losses.

What it takes
  • folds: sum(losses) avg(losses) min(losses) max(losses) count(losses) distinct(losses) only(losses) latest(losses) top(losses) mean(losses) median(losses) mode(losses)
  • ranks: losses_percentile
  • accumulates: as_of(losses)
  • can be a benchmark
NBA Stats · hoopR
minutes MIN number
measure

Minutes he was on the floor. NBA.com

Total minutes played

What it takes
  • folds: sum(minutes) avg(minutes) min(minutes) max(minutes) count(minutes) distinct(minutes) only(minutes) latest(minutes) top(minutes) mean(minutes) median(minutes) mode(minutes)
  • ranks: minutes_percentile
  • accumulates: as_of(minutes)
  • can be a benchmark
NBA Stats · hoopR
pts PTS integer
measure

Points scored. NBA.com

What it takes
  • folds: sum(pts) avg(pts) min(pts) max(pts) count(pts) distinct(pts) only(pts) latest(pts) top(pts) mean(pts) median(pts) mode(pts)
  • ranks: pts_percentile
  • accumulates: as_of(pts)
  • can be a benchmark
NBA Stats · hoopR
reb REB integer
measure

Rebounds. NBA.com

What it takes
  • folds: sum(reb) avg(reb) min(reb) max(reb) count(reb) distinct(reb) only(reb) latest(reb) top(reb) mean(reb) median(reb) mode(reb)
  • ranks: reb_percentile
  • accumulates: as_of(reb)
  • can be a benchmark
NBA Stats · hoopR
oreb OREB integer
measure

Rebounds of the shooting team's own misses. NBA.com

What it takes
  • folds: sum(oreb) avg(oreb) min(oreb) max(oreb) count(oreb) distinct(oreb) only(oreb) latest(oreb) top(oreb) mean(oreb) median(oreb) mode(oreb)
  • ranks: oreb_percentile
  • accumulates: as_of(oreb)
  • can be a benchmark
NBA Stats · hoopR
dreb DREB integer
measure

Rebounds of the opponent's misses. NBA.com

What it takes
  • folds: sum(dreb) avg(dreb) min(dreb) max(dreb) count(dreb) distinct(dreb) only(dreb) latest(dreb) top(dreb) mean(dreb) median(dreb) mode(dreb)
  • ranks: dreb_percentile
  • accumulates: as_of(dreb)
  • can be a benchmark
NBA Stats · hoopR
ast AST integer
measure

Assists — passes that led directly to a basket. NBA.com

What it takes
  • folds: sum(ast) avg(ast) min(ast) max(ast) count(ast) distinct(ast) only(ast) latest(ast) top(ast) mean(ast) median(ast) mode(ast)
  • ranks: ast_percentile
  • accumulates: as_of(ast)
  • can be a benchmark
NBA Stats · hoopR
stl STL integer
measure

Steals. NBA.com

What it takes
  • folds: sum(stl) avg(stl) min(stl) max(stl) count(stl) distinct(stl) only(stl) latest(stl) top(stl) mean(stl) median(stl) mode(stl)
  • ranks: stl_percentile
  • accumulates: as_of(stl)
  • can be a benchmark
NBA Stats · hoopR
blk BLK integer
measure

Shots blocked. NBA.com

What it takes
  • folds: sum(blk) avg(blk) min(blk) max(blk) count(blk) distinct(blk) only(blk) latest(blk) top(blk) mean(blk) median(blk) mode(blk)
  • ranks: blk_percentile
  • accumulates: as_of(blk)
  • can be a benchmark
NBA Stats · hoopR
tov lower is better TOV integer
measure

Turnovers. NBA.com

What it takes
  • folds: sum(tov) avg(tov) min(tov) max(tov) count(tov) distinct(tov) only(tov) latest(tov) top(tov) mean(tov) median(tov) mode(tov)
  • ranks: tov_percentile
  • accumulates: as_of(tov)
  • can be a benchmark
NBA Stats · hoopR
pf lower is better PF integer
measure

Fouls committed. NBA.com

What it takes
  • folds: sum(pf) avg(pf) min(pf) max(pf) count(pf) distinct(pf) only(pf) latest(pf) top(pf) mean(pf) median(pf) mode(pf)
  • ranks: pf_percentile
  • accumulates: as_of(pf)
  • can be a benchmark
NBA Stats · hoopR
fgm FGM integer
measure

Field goals made — every basket except a free throw. NBA.com

What it takes
  • folds: sum(fgm) avg(fgm) min(fgm) max(fgm) count(fgm) distinct(fgm) only(fgm) latest(fgm) top(fgm) mean(fgm) median(fgm) mode(fgm)
  • ranks: fgm_percentile
  • accumulates: as_of(fgm)
  • can be a benchmark
NBA Stats · hoopR
fga FGA integer
measure

Field goals attempted. NBA.com

What it takes
  • folds: sum(fga) avg(fga) min(fga) max(fga) count(fga) distinct(fga) only(fga) latest(fga) top(fga) mean(fga) median(fga) mode(fga)
  • ranks: fga_percentile
  • accumulates: as_of(fga)
  • can be a benchmark
NBA Stats · hoopR
fg3m 3PM integer
measure

Three-pointers made. NBA.com

What it takes
  • folds: sum(fg3m) avg(fg3m) min(fg3m) max(fg3m) count(fg3m) distinct(fg3m) only(fg3m) latest(fg3m) top(fg3m) mean(fg3m) median(fg3m) mode(fg3m)
  • ranks: fg3m_percentile
  • accumulates: as_of(fg3m)
  • can be a benchmark
NBA Stats · hoopR
fg3a 3PA integer
measure

Three-pointers attempted. NBA.com

What it takes
  • folds: sum(fg3a) avg(fg3a) min(fg3a) max(fg3a) count(fg3a) distinct(fg3a) only(fg3a) latest(fg3a) top(fg3a) mean(fg3a) median(fg3a) mode(fg3a)
  • ranks: fg3a_percentile
  • accumulates: as_of(fg3a)
  • can be a benchmark
NBA Stats · hoopR
ftm FTM integer
measure

Free throws made. NBA.com

What it takes
  • folds: sum(ftm) avg(ftm) min(ftm) max(ftm) count(ftm) distinct(ftm) only(ftm) latest(ftm) top(ftm) mean(ftm) median(ftm) mode(ftm)
  • ranks: ftm_percentile
  • accumulates: as_of(ftm)
  • can be a benchmark
NBA Stats · hoopR
fta FTA integer
measure

Free throws attempted. NBA.com

What it takes
  • folds: sum(fta) avg(fta) min(fta) max(fta) count(fta) distinct(fta) only(fta) latest(fta) top(fta) mean(fta) median(fta) mode(fta)
  • ranks: fta_percentile
  • accumulates: as_of(fta)
  • can be a benchmark
NBA Stats · hoopR
fg_pct FG% number
measure

Share of field goals that went in. NBA.com

What it takes
  • folds: sum(fg_pct) avg(fg_pct) min(fg_pct) max(fg_pct) count(fg_pct) distinct(fg_pct) only(fg_pct) latest(fg_pct) top(fg_pct) mean(fg_pct) median(fg_pct) mode(fg_pct)
  • ranks: fg_pct_percentile
  • accumulates: as_of(fg_pct)
  • can be a benchmark
NBA Stats · hoopR
fg3_pct 3P% number
measure

Share of three-pointers that went in. NBA.com

What it takes
  • folds: sum(fg3_pct) avg(fg3_pct) min(fg3_pct) max(fg3_pct) count(fg3_pct) distinct(fg3_pct) only(fg3_pct) latest(fg3_pct) top(fg3_pct) mean(fg3_pct) median(fg3_pct) mode(fg3_pct)
  • ranks: fg3_pct_percentile
  • accumulates: as_of(fg3_pct)
  • can be a benchmark
NBA Stats · hoopR
ft_pct FT% number
measure

Share of free throws that went in. NBA.com

What it takes
  • folds: sum(ft_pct) avg(ft_pct) min(ft_pct) max(ft_pct) count(ft_pct) distinct(ft_pct) only(ft_pct) latest(ft_pct) top(ft_pct) mean(ft_pct) median(ft_pct) mode(ft_pct)
  • ranks: ft_pct_percentile
  • accumulates: as_of(ft_pct)
  • can be a benchmark
NBA Stats · hoopR
plus_minus +/- integer
measure

How much the club outscored the opponent by over the minutes counted. NBA.com

What it takes
  • folds: sum(plus_minus) avg(plus_minus) min(plus_minus) max(plus_minus) count(plus_minus) distinct(plus_minus) only(plus_minus) latest(plus_minus) top(plus_minus) mean(plus_minus) median(plus_minus) mode(plus_minus)
  • ranks: plus_minus_percentile
  • accumulates: as_of(plus_minus)
  • can be a benchmark
NBA Stats · hoopR
off_rating ORtg number
measure

Points scored per 100 possessions while on the floor. NBA.com

Points his club scored per 100 possessions he was on the floor for

What it takes
  • folds: sum(off_rating) avg(off_rating) min(off_rating) max(off_rating) count(off_rating) distinct(off_rating) only(off_rating) latest(off_rating) top(off_rating) mean(off_rating) median(off_rating) mode(off_rating)
  • ranks: off_rating_percentile
  • accumulates: as_of(off_rating)
  • can be a benchmark
NBA Stats · hoopR
def_rating lower is better DRtg number
measure

Points allowed per 100 possessions while on the floor. NBA.com

What it takes
  • folds: sum(def_rating) avg(def_rating) min(def_rating) max(def_rating) count(def_rating) distinct(def_rating) only(def_rating) latest(def_rating) top(def_rating) mean(def_rating) median(def_rating) mode(def_rating)
  • ranks: def_rating_percentile
  • accumulates: as_of(def_rating)
  • can be a benchmark
NBA Stats · hoopR
net_rating NetRtg number
measure

Offensive rating less defensive rating. NBA.com

What it takes
  • folds: sum(net_rating) avg(net_rating) min(net_rating) max(net_rating) count(net_rating) distinct(net_rating) only(net_rating) latest(net_rating) top(net_rating) mean(net_rating) median(net_rating) mode(net_rating)
  • ranks: net_rating_percentile
  • accumulates: as_of(net_rating)
  • can be a benchmark
NBA Stats · hoopR
ts_pct TS% number
measure

True shooting percentage — points per scoring possession, counting twos, threes and free throws together. The single fairest measure of how efficiently a player scores. NBA.com

What it takes
  • folds: sum(ts_pct) avg(ts_pct) min(ts_pct) max(ts_pct) count(ts_pct) distinct(ts_pct) only(ts_pct) latest(ts_pct) top(ts_pct) mean(ts_pct) median(ts_pct) mode(ts_pct)
  • ranks: ts_pct_percentile
  • accumulates: as_of(ts_pct)
  • can be a benchmark
NBA Stats · hoopR
efg_pct eFG% number
measure

Effective field goal percentage — shooting percentage with a three counted as a basket and a half, because it is worth that. NBA.com

What it takes
  • folds: sum(efg_pct) avg(efg_pct) min(efg_pct) max(efg_pct) count(efg_pct) distinct(efg_pct) only(efg_pct) latest(efg_pct) top(efg_pct) mean(efg_pct) median(efg_pct) mode(efg_pct)
  • ranks: efg_pct_percentile
  • accumulates: as_of(efg_pct)
  • can be a benchmark
NBA Stats · hoopR
usg_pct USG% number
measure

Usage rate — the share of the club's possessions finished while on the floor, by shooting, drawing a foul or turning it over. NBA.com

Share of his club's possessions he ended while on the floor

What it takes
  • folds: sum(usg_pct) avg(usg_pct) min(usg_pct) max(usg_pct) count(usg_pct) distinct(usg_pct) only(usg_pct) latest(usg_pct) top(usg_pct) mean(usg_pct) median(usg_pct) mode(usg_pct)
  • ranks: usg_pct_percentile
  • accumulates: as_of(usg_pct)
  • can be a benchmark
NBA Stats · hoopR
ast_pct AST% number
measure

Share of the baskets assisted while on the floor. NBA.com

What it takes
  • folds: sum(ast_pct) avg(ast_pct) min(ast_pct) max(ast_pct) count(ast_pct) distinct(ast_pct) only(ast_pct) latest(ast_pct) top(ast_pct) mean(ast_pct) median(ast_pct) mode(ast_pct)
  • ranks: ast_pct_percentile
  • accumulates: as_of(ast_pct)
  • can be a benchmark
NBA Stats · hoopR
reb_pct REB% number
measure

Share of the available rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(reb_pct) avg(reb_pct) min(reb_pct) max(reb_pct) count(reb_pct) distinct(reb_pct) only(reb_pct) latest(reb_pct) top(reb_pct) mean(reb_pct) median(reb_pct) mode(reb_pct)
  • ranks: reb_pct_percentile
  • accumulates: as_of(reb_pct)
  • can be a benchmark
NBA Stats · hoopR
oreb_pct OREB% number
measure

Share of the available offensive rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(oreb_pct) avg(oreb_pct) min(oreb_pct) max(oreb_pct) count(oreb_pct) distinct(oreb_pct) only(oreb_pct) latest(oreb_pct) top(oreb_pct) mean(oreb_pct) median(oreb_pct) mode(oreb_pct)
  • ranks: oreb_pct_percentile
  • accumulates: as_of(oreb_pct)
  • can be a benchmark
NBA Stats · hoopR
dreb_pct DREB% number
measure

Share of the available defensive rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(dreb_pct) avg(dreb_pct) min(dreb_pct) max(dreb_pct) count(dreb_pct) distinct(dreb_pct) only(dreb_pct) latest(dreb_pct) top(dreb_pct) mean(dreb_pct) median(dreb_pct) mode(dreb_pct)
  • ranks: dreb_pct_percentile
  • accumulates: as_of(dreb_pct)
  • can be a benchmark
NBA Stats · hoopR
ast_to AST/TO number
measure

Assists per turnover. NBA.com

What it takes
  • folds: sum(ast_to) avg(ast_to) min(ast_to) max(ast_to) count(ast_to) distinct(ast_to) only(ast_to) latest(ast_to) top(ast_to) mean(ast_to) median(ast_to) mode(ast_to)
  • ranks: ast_to_percentile
  • accumulates: as_of(ast_to)
  • can be a benchmark
NBA Stats · hoopR
ast_ratio AST Ratio number
measure

Assists per hundred possessions he used.

What it takes
  • folds: sum(ast_ratio) avg(ast_ratio) min(ast_ratio) max(ast_ratio) count(ast_ratio) distinct(ast_ratio) only(ast_ratio) latest(ast_ratio) top(ast_ratio) mean(ast_ratio) median(ast_ratio) mode(ast_ratio)
  • ranks: ast_ratio_percentile
  • accumulates: as_of(ast_ratio)
  • can be a benchmark
NBA Stats · hoopR
tov_pct lower is better TOV% number
measure

Share of the possessions he used that ended in a turnover.

What it takes
  • folds: sum(tov_pct) avg(tov_pct) min(tov_pct) max(tov_pct) count(tov_pct) distinct(tov_pct) only(tov_pct) latest(tov_pct) top(tov_pct) mean(tov_pct) median(tov_pct) mode(tov_pct)
  • ranks: tov_pct_percentile
  • accumulates: as_of(tov_pct)
  • can be a benchmark
NBA Stats · hoopR
pace Pace number
measure

Possessions per 48 minutes — how fast the game was played. NBA.com

What it takes
  • folds: sum(pace) avg(pace) min(pace) max(pace) count(pace) distinct(pace) only(pace) latest(pace) top(pace) mean(pace) median(pace) mode(pace)
  • ranks: pace_percentile
  • accumulates: as_of(pace)
  • can be a benchmark
NBA Stats · hoopR
pie PIE number
measure

Player impact estimate — a share of everything statistical that happened in the game, as one percentage. NBA.com

His share of everything both clubs did in the games he played

What it takes
  • folds: sum(pie) avg(pie) min(pie) max(pie) count(pie) distinct(pie) only(pie) latest(pie) top(pie) mean(pie) median(pie) mode(pie)
  • ranks: pie_percentile
  • accumulates: as_of(pie)
  • can be a benchmark
NBA Stats · hoopR
poss Poss integer
measure

Possessions he was on the floor for.

Possessions he was on the floor for

What it takes
  • folds: sum(poss) avg(poss) min(poss) max(poss) count(poss) distinct(poss) only(poss) latest(poss) top(poss) mean(poss) median(poss) mode(poss)
  • ranks: poss_percentile
  • accumulates: as_of(poss)
  • can be a benchmark
NBA Stats · hoopR
rapm RAPM number
measure

Regularized adjusted plus-minus: his effect on the scoreboard per hundred possessions, once every teammate and opponent on the floor is accounted for.

Regularized adjusted plus-minus: his effect per 100 possessions once every teammate and opponent is accounted for

RAPM starts in 1997

What it takes
  • folds: sum(rapm) avg(rapm) min(rapm) max(rapm) count(rapm) distinct(rapm) only(rapm) latest(rapm) top(rapm) mean(rapm) median(rapm) mode(rapm)
  • ranks: rapm_percentile
  • accumulates: as_of(rapm)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
o_rapm O-RAPM number
measure

The offensive half of RAPM.

O-RAPM starts in 1997

What it takes
  • folds: sum(o_rapm) avg(o_rapm) min(o_rapm) max(o_rapm) count(o_rapm) distinct(o_rapm) only(o_rapm) latest(o_rapm) top(o_rapm) mean(o_rapm) median(o_rapm) mode(o_rapm)
  • ranks: o_rapm_percentile
  • accumulates: as_of(o_rapm)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
d_rapm D-RAPM number
measure

The defensive half of RAPM.

D-RAPM starts in 1997

What it takes
  • folds: sum(d_rapm) avg(d_rapm) min(d_rapm) max(d_rapm) count(d_rapm) distinct(d_rapm) only(d_rapm) latest(d_rapm) top(d_rapm) mean(d_rapm) median(d_rapm) mode(d_rapm)
  • ranks: d_rapm_percentile
  • accumulates: as_of(d_rapm)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
adj_rapm Adj RAPM number
measure

RAPM with a prior applied, which is what keeps a small sample from reading as a superstar.

RAPM with a prior, which is what makes a small sample behave

Adj RAPM starts in 1997

What it takes
  • folds: sum(adj_rapm) avg(adj_rapm) min(adj_rapm) max(adj_rapm) count(adj_rapm) distinct(adj_rapm) only(adj_rapm) latest(adj_rapm) top(adj_rapm) mean(adj_rapm) median(adj_rapm) mode(adj_rapm)
  • ranks: adj_rapm_percentile
  • accumulates: as_of(adj_rapm)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
bpm BPM number
measure

Box plus-minus: the same question asked of the box score alone.

Box plus-minus — the same question asked of the box score alone

BPM starts in 1997

What it takes
  • folds: sum(bpm) avg(bpm) min(bpm) max(bpm) count(bpm) distinct(bpm) only(bpm) latest(bpm) top(bpm) mean(bpm) median(bpm) mode(bpm)
  • ranks: bpm_percentile
  • accumulates: as_of(bpm)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
obpm OBPM number
measure

The offensive half of box plus-minus.

OBPM starts in 1997

What it takes
  • folds: sum(obpm) avg(obpm) min(obpm) max(obpm) count(obpm) distinct(obpm) only(obpm) latest(obpm) top(obpm) mean(obpm) median(obpm) mode(obpm)
  • ranks: obpm_percentile
  • accumulates: as_of(obpm)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
dbpm DBPM number
measure

The defensive half of box plus-minus.

DBPM starts in 1997

What it takes
  • folds: sum(dbpm) avg(dbpm) min(dbpm) max(dbpm) count(dbpm) distinct(dbpm) only(dbpm) latest(dbpm) top(dbpm) mean(dbpm) median(dbpm) mode(dbpm)
  • ranks: dbpm_percentile
  • accumulates: as_of(dbpm)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
spm SPM number
measure

Statistical plus-minus — a box-score estimate of his effect per hundred possessions.

Statistical plus-minus

SPM starts in 1997

What it takes
  • folds: sum(spm) avg(spm) min(spm) max(spm) count(spm) distinct(spm) only(spm) latest(spm) top(spm) mean(spm) median(spm) mode(spm)
  • ranks: spm_percentile
  • accumulates: as_of(spm)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
war WAR number
measure

Wins above a replacement-level player. It sums, so a career total is sum(war).

Wins above a replacement-level player — sums, so a career total is sum(war)

WAR starts in 1997

What it takes
  • folds: sum(war) avg(war) min(war) max(war) count(war) distinct(war) only(war) latest(war) top(war) mean(war) median(war) mode(war)
  • ranks: war_percentile
  • accumulates: as_of(war)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
darko DARKO number
measure

A skill estimate that updates game by game rather than settling at the season's end.

A skill estimate that updates game by game rather than settling at the season's end

DARKO starts in 1997

What it takes
  • folds: sum(darko) avg(darko) min(darko) max(darko) count(darko) distinct(darko) only(darko) latest(darko) top(darko) mean(darko) median(darko) mode(darko)
  • ranks: darko_percentile
  • accumulates: as_of(darko)
  • can be a benchmark
NBA Stats · sportsdataverse NBA impact · hoopR
pts_paint Paint integer
measure

Points scored in the paint.

What it takes
  • folds: sum(pts_paint) avg(pts_paint) min(pts_paint) max(pts_paint) count(pts_paint) distinct(pts_paint) only(pts_paint) latest(pts_paint) top(pts_paint) mean(pts_paint) median(pts_paint) mode(pts_paint)
  • ranks: pts_paint_percentile
  • accumulates: as_of(pts_paint)
  • can be a benchmark
NBA Stats · hoopR
pts_fb FB integer
measure

Points scored on the fast break.

Fast-break points

What it takes
  • folds: sum(pts_fb) avg(pts_fb) min(pts_fb) max(pts_fb) count(pts_fb) distinct(pts_fb) only(pts_fb) latest(pts_fb) top(pts_fb) mean(pts_fb) median(pts_fb) mode(pts_fb)
  • ranks: pts_fb_percentile
  • accumulates: as_of(pts_fb)
  • can be a benchmark
NBA Stats · hoopR
pts_off_tov Off TOV integer
measure

Points scored off the opponent's turnovers.

What it takes
  • folds: sum(pts_off_tov) avg(pts_off_tov) min(pts_off_tov) max(pts_off_tov) count(pts_off_tov) distinct(pts_off_tov) only(pts_off_tov) latest(pts_off_tov) top(pts_off_tov) mean(pts_off_tov) median(pts_off_tov) mode(pts_off_tov)
  • ranks: pts_off_tov_percentile
  • accumulates: as_of(pts_off_tov)
  • can be a benchmark
NBA Stats · hoopR
pts_2nd_chance 2nd integer
measure

Points scored after an offensive rebound.

What it takes
  • folds: sum(pts_2nd_chance) avg(pts_2nd_chance) min(pts_2nd_chance) max(pts_2nd_chance) count(pts_2nd_chance) distinct(pts_2nd_chance) only(pts_2nd_chance) latest(pts_2nd_chance) top(pts_2nd_chance) mean(pts_2nd_chance) median(pts_2nd_chance) mode(pts_2nd_chance)
  • ranks: pts_2nd_chance_percentile
  • accumulates: as_of(pts_2nd_chance)
  • can be a benchmark
NBA Stats · hoopR
pct_pts_3pt %Pts 3 number
measure

Share of his points that came from three.

Share of his points that came from threes

What it takes
  • folds: sum(pct_pts_3pt) avg(pct_pts_3pt) min(pct_pts_3pt) max(pct_pts_3pt) count(pct_pts_3pt) distinct(pct_pts_3pt) only(pct_pts_3pt) latest(pct_pts_3pt) top(pct_pts_3pt) mean(pct_pts_3pt) median(pct_pts_3pt) mode(pct_pts_3pt)
  • ranks: pct_pts_3pt_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_pts_paint %Pts Paint number
measure

Share of his points scored in the paint.

What it takes
  • folds: sum(pct_pts_paint) avg(pct_pts_paint) min(pct_pts_paint) max(pct_pts_paint) count(pct_pts_paint) distinct(pct_pts_paint) only(pct_pts_paint) latest(pct_pts_paint) top(pct_pts_paint) mean(pct_pts_paint) median(pct_pts_paint) mode(pct_pts_paint)
  • ranks: pct_pts_paint_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_pts_ft %Pts FT number
measure

Share of his points from the free-throw line.

What it takes
  • folds: sum(pct_pts_ft) avg(pct_pts_ft) min(pct_pts_ft) max(pct_pts_ft) count(pct_pts_ft) distinct(pct_pts_ft) only(pct_pts_ft) latest(pct_pts_ft) top(pct_pts_ft) mean(pct_pts_ft) median(pct_pts_ft) mode(pct_pts_ft)
  • ranks: pct_pts_ft_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_fga_3pt %FGA 3 number
measure

Share of his attempts that were threes.

Share of his attempts that were threes

What it takes
  • folds: sum(pct_fga_3pt) avg(pct_fga_3pt) min(pct_fga_3pt) max(pct_fga_3pt) count(pct_fga_3pt) distinct(pct_fga_3pt) only(pct_fga_3pt) latest(pct_fga_3pt) top(pct_fga_3pt) mean(pct_fga_3pt) median(pct_fga_3pt) mode(pct_fga_3pt)
  • ranks: pct_fga_3pt_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_uast_fgm %Unast number
measure

Share of his made field goals nobody assisted — the shots he created himself.

Share of his made shots nobody assisted

What it takes
  • folds: sum(pct_uast_fgm) avg(pct_uast_fgm) min(pct_uast_fgm) max(pct_uast_fgm) count(pct_uast_fgm) distinct(pct_uast_fgm) only(pct_uast_fgm) latest(pct_uast_fgm) top(pct_uast_fgm) mean(pct_uast_fgm) median(pct_uast_fgm) mode(pct_uast_fgm)
  • ranks: pct_uast_fgm_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_ast_fgm %Ast number
measure

Share of his made field goals that somebody assisted.

What it takes
  • folds: sum(pct_ast_fgm) avg(pct_ast_fgm) min(pct_ast_fgm) max(pct_ast_fgm) count(pct_ast_fgm) distinct(pct_ast_fgm) only(pct_ast_fgm) latest(pct_ast_fgm) top(pct_ast_fgm) mean(pct_ast_fgm) median(pct_ast_fgm) mode(pct_ast_fgm)
  • ranks: pct_ast_fgm_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_pts %Team Pts number
measure

Share of his club's points.

Share of his club's points

What it takes
  • folds: sum(pct_pts) avg(pct_pts) min(pct_pts) max(pct_pts) count(pct_pts) distinct(pct_pts) only(pct_pts) latest(pct_pts) top(pct_pts) mean(pct_pts) median(pct_pts) mode(pct_pts)
  • ranks: pct_pts_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_reb %Team Reb number
measure

Share of his club's rebounds.

What it takes
  • folds: sum(pct_reb) avg(pct_reb) min(pct_reb) max(pct_reb) count(pct_reb) distinct(pct_reb) only(pct_reb) latest(pct_reb) top(pct_reb) mean(pct_reb) median(pct_reb) mode(pct_reb)
  • ranks: pct_reb_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_ast %Team Ast number
measure

Share of his club's assists.

What it takes
  • folds: sum(pct_ast) avg(pct_ast) min(pct_ast) max(pct_ast) count(pct_ast) distinct(pct_ast) only(pct_ast) latest(pct_ast) top(pct_ast) mean(pct_ast) median(pct_ast) mode(pct_ast)
  • ranks: pct_ast_percentile
  • can be a benchmark
NBA Stats · hoopR
dd2 DD integer
measure

Double-doubles — ten or more in two of points, rebounds, assists, steals and blocks.

Double-doubles

What it takes
  • folds: sum(dd2) avg(dd2) min(dd2) max(dd2) count(dd2) distinct(dd2) only(dd2) latest(dd2) top(dd2) mean(dd2) median(dd2) mode(dd2)
  • ranks: dd2_percentile
  • accumulates: as_of(dd2)
  • can be a benchmark
NBA Stats · hoopR
td3 TD integer
measure

Triple-doubles.

Triple-doubles

What it takes
  • folds: sum(td3) avg(td3) min(td3) max(td3) count(td3) distinct(td3) only(td3) latest(td3) top(td3) mean(td3) median(td3) mode(td3)
  • ranks: td3_percentile
  • accumulates: as_of(td3)
  • can be a benchmark
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · hoopR
Rates this table names 4

ppg PPG

built from sum(pts) sum(games)

Points per game played.

from nba.players
select player, ppg
group by player
order by ppg desc
limit 10

rpg RPG

built from sum(reb) sum(games)

Rebounds per game played.

from nba.players
select player, rpg
group by player
order by rpg desc
limit 10

apg APG

built from sum(ast) sum(games)

Assists per game played.

from nba.players
select player, apg
group by player
order by apg desc
limit 10

mpg MPG

built from sum(minutes) sum(games)

Minutes per game. NBA.com

from nba.players
select player, mpg
group by player
order by mpg desc
limit 10
Operators on this table 38 available, 5 not

from

The one table a query reads

from nba.players
select player, team, games, pts, reb, ast, ts_pct, usg_pct, net_rating
order by pts desc
limit 100

select

The columns the answer carries

from nba.players
select player, team, games, pts, reb, ast, ts_pct, usg_pct, net_rating
order by pts desc
limit 100

as

Renames a column's heading and nothing else

from nba.players
select player, team, games as GP
order by games desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.players
where season = $year
select player, team, games
order by games desc
limit 10

limit

How many rows come back

from nba.players
select player, team, games, pts, reb, ast, ts_pct, usg_pct, net_rating
order by pts desc
limit 100

order by

Which end of the answer comes first

from nba.players
select player, team, games
order by games desc
limit 10

#

A comment, to the end of the line

# Player seasons (league) — One row per player per season since 1996-97 — the league's own dashboards, with the plus-minus models beside them.
from nba.players
select player, team, games, pts, reb, ast, ts_pct, usg_pct, net_rating
order by pts desc
limit 100

where

Chooses the rows the question is about

from nba.players
where season = 2026
select player, games
order by games desc
limit 10

and

Continues whichever filter clause came last

from nba.players
where season = 2026 and games > 0
select player, games
order by games desc
limit 10

having

Filters the groups a fold made

from nba.players
select player, sum(games)
group by player
having sum(games) > 0
order by sum(games) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.players
where season = 2026
select player, games, games_percentile
keep games_percentile >= 90
order by games_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.players
select player, season, games
highlight season = 2026
order by games desc
limit 10

of

A threshold that is another row rather than a number

from nba.players
where games >= max(games) of position PG
select player, games
order by games desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.players
select player, count(*), sum(games)
group by player
order by sum(games) desc
limit 10

then

Folds the answer a second time

from nba.players
select player, team, count(*)
group by player, team
having count(*) > 10
then
select player, count(*) as Teams
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.players
select player, team, sum(games)
group by player, team
pivot by team
limit 25

first / last

Only part of each career, before anything else runs

from nba.players
first 3 seasons
select player, sum(games)
group by player
order by sum(games) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.players
select player, sum(games)
group by player
order by sum(games) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.players
select player, avg(games)
group by player
order by avg(games) desc
limit 10

min(…)

The smallest value in each group

from nba.players
select player, min(games)
group by player
order by min(games) desc
limit 10

max(…)

The largest value in each group

from nba.players
select player, max(games)
group by player
order by max(games) desc
limit 10

count(…)

How many rows a group swallowed

from nba.players
select player, count(games)
group by player
order by count(games) desc
limit 10

distinct(…)

How many different values a group holds

from nba.players
select player, distinct(team)
group by player
order by distinct(team) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.players
where season = 2026
select player, only(team)
group by player
order by only(team) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.players
select player, latest(player)
group by player
order by count(*) desc
limit 10

top(…)

The value on the group's biggest row

from nba.players
select player, top(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.players
select player, mean(games)
group by player
order by mean(games) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.players
select player, median(games)
group by player
order by median(games) desc
limit 10

mode(…)

The commonest value in the group

from nba.players
select player, mode(player)
group by player
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.players
where season = 2026
select player, games, games_percentile
order by games_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.players
select player, sum(games), percentile(sum(games))
group by player
order by sum(games) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.players
where season = 2026
select player, games, standing(games)
order by games desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.players
where season = 2026
select player, clubs, age, composite(clubs, age)
order by composite(clubs, age) desc
limit 10

ratio(…)

One column divided by another

from nba.players
select player, count(*), ratio(sum(games), count(*))
group by player
order by ratio(sum(games), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.players
where season = 2026
select player, clubs, age, calc(standing(clubs) - standing(age))
order by calc(standing(clubs) - standing(age)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.players
select player, games, format(games, > 0 -> "on the board", <= 0 -> "nothing yet")
order by games desc
limit 10

pair

Draws two columns of the answer in one

from nba.players
where season = 2026
select player, games, games_percentile
pair games with games_percentile
order by games desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.players
where season = 2026
select player, clubs, age, height_inches, composite(clubs, age, height_inches) as Score
hint composite(clubs, age, height_inches) as "#Clubs + Age + Ht"
order by composite(clubs, age, height_inches) desc
limit 10

Not on this table

  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along

nba.player_games Player box scores

One row per player per game, traditional and advanced together.

from nba.player_games
select game_date, player, team, minutes, pts, reb, ast, ts_pct
order by pts desc
limit 200
One row is
one player's game (player-game)
Built from
one table, read straight
Reads
nba_player_games NBA Stats, hoopR
Shows by default
game_date player team minutes pts reb ast ts_pct
Ordered by
pts desc
Rows
200 by default, 10000 at most
Ranks within
season
Careers counted in
seasons game_dates games
Newest row
game_date

Applied unless you say otherwise

  • Limited to the regular season — add where season_type = Playoffs to change it.

Before you trust the numbers

  • A did-not-play row still exists, with null minutes and a comment upstream.
Dimensions 5
NameBound to
league always nba
team the team column
player the player column
position the position column
season the season column
Columns 43
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
season_type completes season_type Type string
dimension

Whether the game was a regular-season, play-in or playoff game.

Regular Season, Playoffs or PlayIn

What it takes
  • folds: count(season_type) distinct(season_type) only(season_type) latest(season_type) mode(season_type)
NBA Stats · hoopR
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) mode(player)
NBA Stats · hoopR
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) mode(team)
NBA Stats · hoopR
game_date Date date
dimension

The date the game was played.

What it takes
  • folds: min(game_date) max(game_date) count(game_date) distinct(game_date) only(game_date) latest(game_date) mode(game_date)
  • periods: year(game_date) quarter(game_date) month(game_date) week(game_date)
  • can be a benchmark
NBA Stats · hoopR
position completes position Pos string
dimension

The position he started at.

The position he is listed at

What it takes
  • folds: count(position) distinct(position) only(position) latest(position) mode(position)
NBA Stats · hoopR
minutes MIN number
measure

Minutes he was on the floor. NBA.com

Minutes played, as a decimal

What it takes
  • folds: sum(minutes) avg(minutes) min(minutes) max(minutes) count(minutes) distinct(minutes) only(minutes) latest(minutes) mean(minutes) median(minutes) mode(minutes)
  • ranks: minutes_percentile
  • accumulates: as_of(minutes)
  • can be a benchmark
NBA Stats · hoopR
played Played boolean
dimension

Whether he actually got on the floor.

Whether he actually appeared — false for a did-not-play row

What it takes
  • folds: count(played) distinct(played) only(played) latest(played) mode(played)
NBA Stats · hoopR
pts PTS integer
measure

Points scored. NBA.com

What it takes
  • folds: sum(pts) avg(pts) min(pts) max(pts) count(pts) distinct(pts) only(pts) latest(pts) mean(pts) median(pts) mode(pts)
  • ranks: pts_percentile
  • accumulates: as_of(pts)
  • can be a benchmark
NBA Stats · hoopR
reb REB integer
measure

Rebounds. NBA.com

What it takes
  • folds: sum(reb) avg(reb) min(reb) max(reb) count(reb) distinct(reb) only(reb) latest(reb) mean(reb) median(reb) mode(reb)
  • ranks: reb_percentile
  • accumulates: as_of(reb)
  • can be a benchmark
NBA Stats · hoopR
oreb OREB integer
measure

Rebounds of the shooting team's own misses. NBA.com

What it takes
  • folds: sum(oreb) avg(oreb) min(oreb) max(oreb) count(oreb) distinct(oreb) only(oreb) latest(oreb) mean(oreb) median(oreb) mode(oreb)
  • ranks: oreb_percentile
  • accumulates: as_of(oreb)
  • can be a benchmark
NBA Stats · hoopR
dreb DREB integer
measure

Rebounds of the opponent's misses. NBA.com

What it takes
  • folds: sum(dreb) avg(dreb) min(dreb) max(dreb) count(dreb) distinct(dreb) only(dreb) latest(dreb) mean(dreb) median(dreb) mode(dreb)
  • ranks: dreb_percentile
  • accumulates: as_of(dreb)
  • can be a benchmark
NBA Stats · hoopR
ast AST integer
measure

Assists — passes that led directly to a basket. NBA.com

What it takes
  • folds: sum(ast) avg(ast) min(ast) max(ast) count(ast) distinct(ast) only(ast) latest(ast) mean(ast) median(ast) mode(ast)
  • ranks: ast_percentile
  • accumulates: as_of(ast)
  • can be a benchmark
NBA Stats · hoopR
stl STL integer
measure

Steals. NBA.com

What it takes
  • folds: sum(stl) avg(stl) min(stl) max(stl) count(stl) distinct(stl) only(stl) latest(stl) mean(stl) median(stl) mode(stl)
  • ranks: stl_percentile
  • accumulates: as_of(stl)
  • can be a benchmark
NBA Stats · hoopR
blk BLK integer
measure

Shots blocked. NBA.com

What it takes
  • folds: sum(blk) avg(blk) min(blk) max(blk) count(blk) distinct(blk) only(blk) latest(blk) mean(blk) median(blk) mode(blk)
  • ranks: blk_percentile
  • accumulates: as_of(blk)
  • can be a benchmark
NBA Stats · hoopR
tov lower is better TOV integer
measure

Turnovers. NBA.com

What it takes
  • folds: sum(tov) avg(tov) min(tov) max(tov) count(tov) distinct(tov) only(tov) latest(tov) mean(tov) median(tov) mode(tov)
  • ranks: tov_percentile
  • accumulates: as_of(tov)
  • can be a benchmark
NBA Stats · hoopR
pf lower is better PF integer
measure

Fouls committed. NBA.com

What it takes
  • folds: sum(pf) avg(pf) min(pf) max(pf) count(pf) distinct(pf) only(pf) latest(pf) mean(pf) median(pf) mode(pf)
  • ranks: pf_percentile
  • accumulates: as_of(pf)
  • can be a benchmark
NBA Stats · hoopR
fgm FGM integer
measure

Field goals made — every basket except a free throw. NBA.com

What it takes
  • folds: sum(fgm) avg(fgm) min(fgm) max(fgm) count(fgm) distinct(fgm) only(fgm) latest(fgm) mean(fgm) median(fgm) mode(fgm)
  • ranks: fgm_percentile
  • accumulates: as_of(fgm)
  • can be a benchmark
NBA Stats · hoopR
fga FGA integer
measure

Field goals attempted. NBA.com

What it takes
  • folds: sum(fga) avg(fga) min(fga) max(fga) count(fga) distinct(fga) only(fga) latest(fga) mean(fga) median(fga) mode(fga)
  • ranks: fga_percentile
  • accumulates: as_of(fga)
  • can be a benchmark
NBA Stats · hoopR
fg3m 3PM integer
measure

Three-pointers made. NBA.com

What it takes
  • folds: sum(fg3m) avg(fg3m) min(fg3m) max(fg3m) count(fg3m) distinct(fg3m) only(fg3m) latest(fg3m) mean(fg3m) median(fg3m) mode(fg3m)
  • ranks: fg3m_percentile
  • accumulates: as_of(fg3m)
  • can be a benchmark
NBA Stats · hoopR
fg3a 3PA integer
measure

Three-pointers attempted. NBA.com

What it takes
  • folds: sum(fg3a) avg(fg3a) min(fg3a) max(fg3a) count(fg3a) distinct(fg3a) only(fg3a) latest(fg3a) mean(fg3a) median(fg3a) mode(fg3a)
  • ranks: fg3a_percentile
  • accumulates: as_of(fg3a)
  • can be a benchmark
NBA Stats · hoopR
ftm FTM integer
measure

Free throws made. NBA.com

What it takes
  • folds: sum(ftm) avg(ftm) min(ftm) max(ftm) count(ftm) distinct(ftm) only(ftm) latest(ftm) mean(ftm) median(ftm) mode(ftm)
  • ranks: ftm_percentile
  • accumulates: as_of(ftm)
  • can be a benchmark
NBA Stats · hoopR
fta FTA integer
measure

Free throws attempted. NBA.com

What it takes
  • folds: sum(fta) avg(fta) min(fta) max(fta) count(fta) distinct(fta) only(fta) latest(fta) mean(fta) median(fta) mode(fta)
  • ranks: fta_percentile
  • accumulates: as_of(fta)
  • can be a benchmark
NBA Stats · hoopR
fg_pct FG% number
measure

Share of field goals that went in. NBA.com

What it takes
  • folds: sum(fg_pct) avg(fg_pct) min(fg_pct) max(fg_pct) count(fg_pct) distinct(fg_pct) only(fg_pct) latest(fg_pct) mean(fg_pct) median(fg_pct) mode(fg_pct)
  • ranks: fg_pct_percentile
  • accumulates: as_of(fg_pct)
  • can be a benchmark
NBA Stats · hoopR
fg3_pct 3P% number
measure

Share of three-pointers that went in. NBA.com

What it takes
  • folds: sum(fg3_pct) avg(fg3_pct) min(fg3_pct) max(fg3_pct) count(fg3_pct) distinct(fg3_pct) only(fg3_pct) latest(fg3_pct) mean(fg3_pct) median(fg3_pct) mode(fg3_pct)
  • ranks: fg3_pct_percentile
  • accumulates: as_of(fg3_pct)
  • can be a benchmark
NBA Stats · hoopR
ft_pct FT% number
measure

Share of free throws that went in. NBA.com

What it takes
  • folds: sum(ft_pct) avg(ft_pct) min(ft_pct) max(ft_pct) count(ft_pct) distinct(ft_pct) only(ft_pct) latest(ft_pct) mean(ft_pct) median(ft_pct) mode(ft_pct)
  • ranks: ft_pct_percentile
  • accumulates: as_of(ft_pct)
  • can be a benchmark
NBA Stats · hoopR
efg_pct eFG% number
measure

Effective field goal percentage — shooting percentage with a three counted as a basket and a half, because it is worth that. NBA.com

What it takes
  • folds: sum(efg_pct) avg(efg_pct) min(efg_pct) max(efg_pct) count(efg_pct) distinct(efg_pct) only(efg_pct) latest(efg_pct) mean(efg_pct) median(efg_pct) mode(efg_pct)
  • ranks: efg_pct_percentile
  • accumulates: as_of(efg_pct)
  • can be a benchmark
NBA Stats · hoopR
ts_pct TS% number
measure

True shooting percentage — points per scoring possession, counting twos, threes and free throws together. The single fairest measure of how efficiently a player scores. NBA.com

What it takes
  • folds: sum(ts_pct) avg(ts_pct) min(ts_pct) max(ts_pct) count(ts_pct) distinct(ts_pct) only(ts_pct) latest(ts_pct) mean(ts_pct) median(ts_pct) mode(ts_pct)
  • ranks: ts_pct_percentile
  • accumulates: as_of(ts_pct)
  • can be a benchmark
NBA Stats · hoopR
usg_pct USG% number
measure

Usage rate — the share of the club's possessions finished while on the floor, by shooting, drawing a foul or turning it over. NBA.com

What it takes
  • folds: sum(usg_pct) avg(usg_pct) min(usg_pct) max(usg_pct) count(usg_pct) distinct(usg_pct) only(usg_pct) latest(usg_pct) mean(usg_pct) median(usg_pct) mode(usg_pct)
  • ranks: usg_pct_percentile
  • accumulates: as_of(usg_pct)
  • can be a benchmark
NBA Stats · hoopR
reb_pct REB% number
measure

Share of the available rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(reb_pct) avg(reb_pct) min(reb_pct) max(reb_pct) count(reb_pct) distinct(reb_pct) only(reb_pct) latest(reb_pct) mean(reb_pct) median(reb_pct) mode(reb_pct)
  • ranks: reb_pct_percentile
  • accumulates: as_of(reb_pct)
  • can be a benchmark
NBA Stats · hoopR
oreb_pct OREB% number
measure

Share of the available offensive rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(oreb_pct) avg(oreb_pct) min(oreb_pct) max(oreb_pct) count(oreb_pct) distinct(oreb_pct) only(oreb_pct) latest(oreb_pct) mean(oreb_pct) median(oreb_pct) mode(oreb_pct)
  • ranks: oreb_pct_percentile
  • accumulates: as_of(oreb_pct)
  • can be a benchmark
NBA Stats · hoopR
dreb_pct DREB% number
measure

Share of the available defensive rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(dreb_pct) avg(dreb_pct) min(dreb_pct) max(dreb_pct) count(dreb_pct) distinct(dreb_pct) only(dreb_pct) latest(dreb_pct) mean(dreb_pct) median(dreb_pct) mode(dreb_pct)
  • ranks: dreb_pct_percentile
  • accumulates: as_of(dreb_pct)
  • can be a benchmark
NBA Stats · hoopR
ast_pct AST% number
measure

Share of the baskets assisted while on the floor. NBA.com

What it takes
  • folds: sum(ast_pct) avg(ast_pct) min(ast_pct) max(ast_pct) count(ast_pct) distinct(ast_pct) only(ast_pct) latest(ast_pct) mean(ast_pct) median(ast_pct) mode(ast_pct)
  • ranks: ast_pct_percentile
  • accumulates: as_of(ast_pct)
  • can be a benchmark
NBA Stats · hoopR
ast_to AST/TO number
measure

Assists per turnover. NBA.com

What it takes
  • folds: sum(ast_to) avg(ast_to) min(ast_to) max(ast_to) count(ast_to) distinct(ast_to) only(ast_to) latest(ast_to) mean(ast_to) median(ast_to) mode(ast_to)
  • ranks: ast_to_percentile
  • accumulates: as_of(ast_to)
  • can be a benchmark
NBA Stats · hoopR
off_rating ORtg number
measure

Points scored per 100 possessions while on the floor. NBA.com

What it takes
  • folds: sum(off_rating) avg(off_rating) min(off_rating) max(off_rating) count(off_rating) distinct(off_rating) only(off_rating) latest(off_rating) mean(off_rating) median(off_rating) mode(off_rating)
  • ranks: off_rating_percentile
  • accumulates: as_of(off_rating)
  • can be a benchmark
NBA Stats · hoopR
def_rating lower is better DRtg number
measure

Points allowed per 100 possessions while on the floor. NBA.com

What it takes
  • folds: sum(def_rating) avg(def_rating) min(def_rating) max(def_rating) count(def_rating) distinct(def_rating) only(def_rating) latest(def_rating) mean(def_rating) median(def_rating) mode(def_rating)
  • ranks: def_rating_percentile
  • accumulates: as_of(def_rating)
  • can be a benchmark
NBA Stats · hoopR
net_rating NetRtg number
measure

Offensive rating less defensive rating. NBA.com

What it takes
  • folds: sum(net_rating) avg(net_rating) min(net_rating) max(net_rating) count(net_rating) distinct(net_rating) only(net_rating) latest(net_rating) mean(net_rating) median(net_rating) mode(net_rating)
  • ranks: net_rating_percentile
  • accumulates: as_of(net_rating)
  • can be a benchmark
NBA Stats · hoopR
pace Pace number
measure

Possessions per 48 minutes — how fast the game was played. NBA.com

What it takes
  • folds: sum(pace) avg(pace) min(pace) max(pace) count(pace) distinct(pace) only(pace) latest(pace) mean(pace) median(pace) mode(pace)
  • ranks: pace_percentile
  • accumulates: as_of(pace)
  • can be a benchmark
NBA Stats · hoopR
pie PIE number
measure

Player impact estimate — a share of everything statistical that happened in the game, as one percentage. NBA.com

What it takes
  • folds: sum(pie) avg(pie) min(pie) max(pie) count(pie) distinct(pie) only(pie) latest(pie) mean(pie) median(pie) mode(pie)
  • ranks: pie_percentile
  • accumulates: as_of(pie)
  • can be a benchmark
NBA Stats · hoopR
plus_minus +/- integer
measure

How much the club outscored the opponent by over the minutes counted. NBA.com

What it takes
  • folds: sum(plus_minus) avg(plus_minus) min(plus_minus) max(plus_minus) count(plus_minus) distinct(plus_minus) only(plus_minus) latest(plus_minus) mean(plus_minus) median(plus_minus) mode(plus_minus)
  • ranks: plus_minus_percentile
  • accumulates: as_of(plus_minus)
  • can be a benchmark
NBA Stats · hoopR
production Prod integer
measure

Points, rebounds, assists, steals and blocks less turnovers, as one count.

PTS + REB + AST + STL + BLK − TOV

A box-score total, not a rating — it weights a rebound like a point

What it takes
  • folds: sum(production) avg(production) min(production) max(production) count(production) distinct(production) only(production) latest(production) mean(production) median(production) mode(production)
  • ranks: production_percentile
  • accumulates: as_of(production)
  • can be a benchmark
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · hoopR
Operators on this table 42 available, 1 not

from

The one table a query reads

from nba.player_games
select game_date, player, team, minutes, pts, reb, ast, ts_pct
order by pts desc
limit 200

select

The columns the answer carries

from nba.player_games
select game_date, player, team, minutes, pts, reb, ast, ts_pct
order by pts desc
limit 200

as

Renames a column's heading and nothing else

from nba.player_games
select game_date, player, minutes as MIN
order by minutes desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.player_games
where season = $year
select game_date, player, team
order by minutes desc
limit 10

limit

How many rows come back

from nba.player_games
select game_date, player, team, minutes, pts, reb, ast, ts_pct
order by pts desc
limit 200

order by

Which end of the answer comes first

from nba.player_games
select game_date, player, team, minutes
order by minutes desc
limit 10

#

A comment, to the end of the line

# Player box scores — One row per player per game, traditional and advanced together.
from nba.player_games
select game_date, player, team, minutes, pts, reb, ast, ts_pct
order by pts desc
limit 200

where

Chooses the rows the question is about

from nba.player_games
where season = 2026
select player, minutes
order by minutes desc
limit 10

and

Continues whichever filter clause came last

from nba.player_games
where season = 2026 and minutes > 0
select player, minutes
order by minutes desc
limit 10

having

Filters the groups a fold made

from nba.player_games
select player, sum(minutes)
group by player
having sum(minutes) > 0
order by sum(minutes) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.player_games
where season = 2026
select player, minutes, minutes_percentile
keep minutes_percentile >= 90
order by minutes_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.player_games
select player, season, minutes
highlight season = 2026
order by minutes desc
limit 10

of

A threshold that is another row rather than a number

from nba.player_games
where minutes >= max(minutes) of position PG
select player, minutes
order by minutes desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.player_games
select player, count(*), sum(minutes)
group by player
order by sum(minutes) desc
limit 10

then

Folds the answer a second time

from nba.player_games
select player, team, count(*)
group by player, team
having count(*) > 10
then
select player, count(*) as Teams
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.player_games
select player, team, sum(minutes)
group by player, team
pivot by team
limit 25

first / last

Only part of each career, before anything else runs

from nba.player_games
first 3 seasons
select player, sum(minutes)
group by player
order by sum(minutes) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.player_games
select player, sum(minutes)
group by player
order by sum(minutes) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.player_games
select player, avg(minutes)
group by player
order by avg(minutes) desc
limit 10

min(…)

The smallest value in each group

from nba.player_games
select player, min(minutes)
group by player
order by min(minutes) desc
limit 10

max(…)

The largest value in each group

from nba.player_games
select player, max(minutes)
group by player
order by max(minutes) desc
limit 10

count(…)

How many rows a group swallowed

from nba.player_games
select player, count(minutes)
group by player
order by count(minutes) desc
limit 10

distinct(…)

How many different values a group holds

from nba.player_games
select player, distinct(team)
group by player
order by distinct(team) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.player_games
where season = 2026
select player, only(team)
group by player
order by only(team) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.player_games
select player, latest(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.player_games
select player, mean(minutes)
group by player
order by mean(minutes) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.player_games
select player, median(minutes)
group by player
order by median(minutes) desc
limit 10

mode(…)

The commonest value in the group

from nba.player_games
select player, mode(player)
group by player
order by count(*) desc
limit 10

year(…)

Reads a date as the year it falls in

from nba.player_games
select player, year(game_date), sum(minutes)
group by player, year(game_date)
order by year(game_date) asc
limit 20

quarter(…)

Reads a date as the quarter it falls in

from nba.player_games
select player, quarter(game_date), sum(minutes)
group by player, quarter(game_date)
order by quarter(game_date) asc
limit 20

month(…)

Reads a date as the month it falls in

from nba.player_games
select player, month(game_date), sum(minutes)
group by player, month(game_date)
order by month(game_date) asc
limit 20

week(…)

Reads a date as the week it falls in

from nba.player_games
select player, week(game_date), sum(minutes)
group by player, week(game_date)
order by week(game_date) asc
limit 20

as_of(…)

The stat as it stood, season to date

from nba.player_games
where season = 2026
select player, month(game_date), as_of(minutes)
group by player, month(game_date)
order by month(game_date) asc
limit 25

<stat>_percentile

Where a row sits in its population, 0-100

from nba.player_games
where season = 2026
select player, minutes, minutes_percentile
order by minutes_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.player_games
select player, sum(minutes), percentile(sum(minutes))
group by player
order by sum(minutes) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.player_games
where season = 2026
select player, minutes, standing(minutes)
order by minutes desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.player_games
where season = 2026
select player, minutes, pts, composite(minutes, pts)
order by composite(minutes, pts) desc
limit 10

ratio(…)

One column divided by another

from nba.player_games
select player, count(*), ratio(sum(minutes), count(*))
group by player
order by ratio(sum(minutes), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.player_games
where season = 2026
select player, minutes, pts, calc(standing(minutes) - standing(pts))
order by calc(standing(minutes) - standing(pts)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.player_games
select player, minutes, format(minutes, > 0 -> "on the board", <= 0 -> "nothing yet")
order by minutes desc
limit 10

pair

Draws two columns of the answer in one

from nba.player_games
where season = 2026
select player, minutes, minutes_percentile
pair minutes with minutes_percentile
order by minutes desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.player_games
where season = 2026
select player, minutes, pts, reb, composite(minutes, pts, reb) as Score
hint composite(minutes, pts, reb) as "MIN + PTS + REB"
order by composite(minutes, pts, reb) desc
limit 10

Not on this table

  • top(…) — this table does not say which of its rows is the biggest, so there is no top one to pick

nba.teams Club seasons

One row per club per season since 1996-97: its own line, its opponents', and the four factors.

from nba.teams
select team, season, wins, losses, off_rating, def_rating, net_rating, pace
order by net_rating desc
limit 100
One row is
one team's season (team-season)
Built from
one table, read straight
Reads
nba_team_seasons NBA Stats, hoopR
Shows by default
team season wins losses off_rating def_rating net_rating pace
Ordered by
net_rating desc
Rows
100 by default, 3000 at most
Ranks within
season
Careers counted in
seasons
Biggest row
wins

Applied unless you say otherwise

  • Limited to the regular season — add where season_type = Playoffs to change it.

Before you trust the numbers

  • off_rating and def_rating are per 100 possessions, so they compare across eras that played at different speeds — unlike points per game, which does not.
  • The opponent columns are what this club allowed, which is the half its own line cannot say.
Dimensions 5
NameBound to
league always nba
team the team column
player A club season has no player — query nba.players
position A club season has no position
season the season column
Columns 66
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) top(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
season_type completes season_type Type string
dimension

Whether the game was a regular-season, play-in or playoff game.

Regular Season, Playoffs or PlayIn

What it takes
  • folds: count(season_type) distinct(season_type) only(season_type) latest(season_type) top(season_type) mode(season_type)
NBA Stats · hoopR
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) top(team) mode(team)
NBA Stats · hoopR
team_name Club string
dimension

The club's full name.

What it takes
  • folds: count(team_name) distinct(team_name) only(team_name) latest(team_name) top(team_name) mode(team_name)
NBA Stats · hoopR
conference completes conference Conf string
dimension

East or West.

What it takes
  • folds: count(conference) distinct(conference) only(conference) latest(conference) top(conference) mode(conference)
NBA Stats · hoopR
division completes division Div string
dimension

The division the club plays in.

What it takes
  • folds: count(division) distinct(division) only(division) latest(division) top(division) mode(division)
NBA Stats · hoopR
playoff_rank lower is better Seed integer
measure

Where the club seeded in its conference.

Where it seeded in its conference

What it takes
  • folds: sum(playoff_rank) avg(playoff_rank) min(playoff_rank) max(playoff_rank) count(playoff_rank) distinct(playoff_rank) only(playoff_rank) latest(playoff_rank) top(playoff_rank) mean(playoff_rank) median(playoff_rank) mode(playoff_rank)
  • ranks: playoff_rank_percentile
  • accumulates: as_of(playoff_rank)
  • can be a benchmark
NBA Stats · hoopR
games GP integer
measure

Games he played in. NBA.com

What it takes
  • folds: sum(games) avg(games) min(games) max(games) count(games) distinct(games) only(games) latest(games) top(games) mean(games) median(games) mode(games)
  • ranks: games_percentile
  • accumulates: as_of(games)
  • can be a benchmark
NBA Stats · hoopR
wins W integer
measure

Wins.

What it takes
  • folds: sum(wins) avg(wins) min(wins) max(wins) count(wins) distinct(wins) only(wins) latest(wins) top(wins) mean(wins) median(wins) mode(wins)
  • ranks: wins_percentile
  • accumulates: as_of(wins)
  • can be a benchmark
NBA Stats · hoopR
losses lower is better L integer
measure

Losses.

What it takes
  • folds: sum(losses) avg(losses) min(losses) max(losses) count(losses) distinct(losses) only(losses) latest(losses) top(losses) mean(losses) median(losses) mode(losses)
  • ranks: losses_percentile
  • accumulates: as_of(losses)
  • can be a benchmark
NBA Stats · hoopR
win_pct W% number
measure

Wins as a share of games played.

What it takes
  • folds: sum(win_pct) avg(win_pct) min(win_pct) max(win_pct) count(win_pct) distinct(win_pct) only(win_pct) latest(win_pct) top(win_pct) mean(win_pct) median(win_pct) mode(win_pct)
  • ranks: win_pct_percentile
  • accumulates: as_of(win_pct)
  • can be a benchmark
NBA Stats · hoopR
minutes MIN number
measure

Minutes he was on the floor. NBA.com

What it takes
  • folds: sum(minutes) avg(minutes) min(minutes) max(minutes) count(minutes) distinct(minutes) only(minutes) latest(minutes) top(minutes) mean(minutes) median(minutes) mode(minutes)
  • ranks: minutes_percentile
  • accumulates: as_of(minutes)
  • can be a benchmark
NBA Stats · hoopR
pts PTS integer
measure

Points scored. NBA.com

What it takes
  • folds: sum(pts) avg(pts) min(pts) max(pts) count(pts) distinct(pts) only(pts) latest(pts) top(pts) mean(pts) median(pts) mode(pts)
  • ranks: pts_percentile
  • accumulates: as_of(pts)
  • can be a benchmark
NBA Stats · hoopR
reb REB integer
measure

Rebounds. NBA.com

What it takes
  • folds: sum(reb) avg(reb) min(reb) max(reb) count(reb) distinct(reb) only(reb) latest(reb) top(reb) mean(reb) median(reb) mode(reb)
  • ranks: reb_percentile
  • accumulates: as_of(reb)
  • can be a benchmark
NBA Stats · hoopR
oreb OREB integer
measure

Rebounds of the shooting team's own misses. NBA.com

What it takes
  • folds: sum(oreb) avg(oreb) min(oreb) max(oreb) count(oreb) distinct(oreb) only(oreb) latest(oreb) top(oreb) mean(oreb) median(oreb) mode(oreb)
  • ranks: oreb_percentile
  • accumulates: as_of(oreb)
  • can be a benchmark
NBA Stats · hoopR
dreb DREB integer
measure

Rebounds of the opponent's misses. NBA.com

What it takes
  • folds: sum(dreb) avg(dreb) min(dreb) max(dreb) count(dreb) distinct(dreb) only(dreb) latest(dreb) top(dreb) mean(dreb) median(dreb) mode(dreb)
  • ranks: dreb_percentile
  • accumulates: as_of(dreb)
  • can be a benchmark
NBA Stats · hoopR
ast AST integer
measure

Assists — passes that led directly to a basket. NBA.com

What it takes
  • folds: sum(ast) avg(ast) min(ast) max(ast) count(ast) distinct(ast) only(ast) latest(ast) top(ast) mean(ast) median(ast) mode(ast)
  • ranks: ast_percentile
  • accumulates: as_of(ast)
  • can be a benchmark
NBA Stats · hoopR
stl STL integer
measure

Steals. NBA.com

What it takes
  • folds: sum(stl) avg(stl) min(stl) max(stl) count(stl) distinct(stl) only(stl) latest(stl) top(stl) mean(stl) median(stl) mode(stl)
  • ranks: stl_percentile
  • accumulates: as_of(stl)
  • can be a benchmark
NBA Stats · hoopR
blk BLK integer
measure

Shots blocked. NBA.com

What it takes
  • folds: sum(blk) avg(blk) min(blk) max(blk) count(blk) distinct(blk) only(blk) latest(blk) top(blk) mean(blk) median(blk) mode(blk)
  • ranks: blk_percentile
  • accumulates: as_of(blk)
  • can be a benchmark
NBA Stats · hoopR
tov lower is better TOV integer
measure

Turnovers. NBA.com

What it takes
  • folds: sum(tov) avg(tov) min(tov) max(tov) count(tov) distinct(tov) only(tov) latest(tov) top(tov) mean(tov) median(tov) mode(tov)
  • ranks: tov_percentile
  • accumulates: as_of(tov)
  • can be a benchmark
NBA Stats · hoopR
pf lower is better PF integer
measure

Fouls committed. NBA.com

What it takes
  • folds: sum(pf) avg(pf) min(pf) max(pf) count(pf) distinct(pf) only(pf) latest(pf) top(pf) mean(pf) median(pf) mode(pf)
  • ranks: pf_percentile
  • accumulates: as_of(pf)
  • can be a benchmark
NBA Stats · hoopR
fgm FGM integer
measure

Field goals made — every basket except a free throw. NBA.com

What it takes
  • folds: sum(fgm) avg(fgm) min(fgm) max(fgm) count(fgm) distinct(fgm) only(fgm) latest(fgm) top(fgm) mean(fgm) median(fgm) mode(fgm)
  • ranks: fgm_percentile
  • accumulates: as_of(fgm)
  • can be a benchmark
NBA Stats · hoopR
fga FGA integer
measure

Field goals attempted. NBA.com

What it takes
  • folds: sum(fga) avg(fga) min(fga) max(fga) count(fga) distinct(fga) only(fga) latest(fga) top(fga) mean(fga) median(fga) mode(fga)
  • ranks: fga_percentile
  • accumulates: as_of(fga)
  • can be a benchmark
NBA Stats · hoopR
fg3m 3PM integer
measure

Three-pointers made. NBA.com

What it takes
  • folds: sum(fg3m) avg(fg3m) min(fg3m) max(fg3m) count(fg3m) distinct(fg3m) only(fg3m) latest(fg3m) top(fg3m) mean(fg3m) median(fg3m) mode(fg3m)
  • ranks: fg3m_percentile
  • accumulates: as_of(fg3m)
  • can be a benchmark
NBA Stats · hoopR
fg3a 3PA integer
measure

Three-pointers attempted. NBA.com

What it takes
  • folds: sum(fg3a) avg(fg3a) min(fg3a) max(fg3a) count(fg3a) distinct(fg3a) only(fg3a) latest(fg3a) top(fg3a) mean(fg3a) median(fg3a) mode(fg3a)
  • ranks: fg3a_percentile
  • accumulates: as_of(fg3a)
  • can be a benchmark
NBA Stats · hoopR
ftm FTM integer
measure

Free throws made. NBA.com

What it takes
  • folds: sum(ftm) avg(ftm) min(ftm) max(ftm) count(ftm) distinct(ftm) only(ftm) latest(ftm) top(ftm) mean(ftm) median(ftm) mode(ftm)
  • ranks: ftm_percentile
  • accumulates: as_of(ftm)
  • can be a benchmark
NBA Stats · hoopR
fta FTA integer
measure

Free throws attempted. NBA.com

What it takes
  • folds: sum(fta) avg(fta) min(fta) max(fta) count(fta) distinct(fta) only(fta) latest(fta) top(fta) mean(fta) median(fta) mode(fta)
  • ranks: fta_percentile
  • accumulates: as_of(fta)
  • can be a benchmark
NBA Stats · hoopR
fg_pct FG% number
measure

Share of field goals that went in. NBA.com

What it takes
  • folds: sum(fg_pct) avg(fg_pct) min(fg_pct) max(fg_pct) count(fg_pct) distinct(fg_pct) only(fg_pct) latest(fg_pct) top(fg_pct) mean(fg_pct) median(fg_pct) mode(fg_pct)
  • ranks: fg_pct_percentile
  • accumulates: as_of(fg_pct)
  • can be a benchmark
NBA Stats · hoopR
fg3_pct 3P% number
measure

Share of three-pointers that went in. NBA.com

What it takes
  • folds: sum(fg3_pct) avg(fg3_pct) min(fg3_pct) max(fg3_pct) count(fg3_pct) distinct(fg3_pct) only(fg3_pct) latest(fg3_pct) top(fg3_pct) mean(fg3_pct) median(fg3_pct) mode(fg3_pct)
  • ranks: fg3_pct_percentile
  • accumulates: as_of(fg3_pct)
  • can be a benchmark
NBA Stats · hoopR
ft_pct FT% number
measure

Share of free throws that went in. NBA.com

What it takes
  • folds: sum(ft_pct) avg(ft_pct) min(ft_pct) max(ft_pct) count(ft_pct) distinct(ft_pct) only(ft_pct) latest(ft_pct) top(ft_pct) mean(ft_pct) median(ft_pct) mode(ft_pct)
  • ranks: ft_pct_percentile
  • accumulates: as_of(ft_pct)
  • can be a benchmark
NBA Stats · hoopR
plus_minus +/- integer
measure

How much the club outscored the opponent by over the minutes counted. NBA.com

What it takes
  • folds: sum(plus_minus) avg(plus_minus) min(plus_minus) max(plus_minus) count(plus_minus) distinct(plus_minus) only(plus_minus) latest(plus_minus) top(plus_minus) mean(plus_minus) median(plus_minus) mode(plus_minus)
  • ranks: plus_minus_percentile
  • accumulates: as_of(plus_minus)
  • can be a benchmark
NBA Stats · hoopR
off_rating ORtg number
measure

Points scored per 100 possessions while on the floor. NBA.com

What it takes
  • folds: sum(off_rating) avg(off_rating) min(off_rating) max(off_rating) count(off_rating) distinct(off_rating) only(off_rating) latest(off_rating) top(off_rating) mean(off_rating) median(off_rating) mode(off_rating)
  • ranks: off_rating_percentile
  • accumulates: as_of(off_rating)
  • can be a benchmark
NBA Stats · hoopR
def_rating lower is better DRtg number
measure

Points allowed per 100 possessions while on the floor. NBA.com

What it takes
  • folds: sum(def_rating) avg(def_rating) min(def_rating) max(def_rating) count(def_rating) distinct(def_rating) only(def_rating) latest(def_rating) top(def_rating) mean(def_rating) median(def_rating) mode(def_rating)
  • ranks: def_rating_percentile
  • accumulates: as_of(def_rating)
  • can be a benchmark
NBA Stats · hoopR
net_rating NetRtg number
measure

Offensive rating less defensive rating. NBA.com

What it takes
  • folds: sum(net_rating) avg(net_rating) min(net_rating) max(net_rating) count(net_rating) distinct(net_rating) only(net_rating) latest(net_rating) top(net_rating) mean(net_rating) median(net_rating) mode(net_rating)
  • ranks: net_rating_percentile
  • accumulates: as_of(net_rating)
  • can be a benchmark
NBA Stats · hoopR
pace Pace number
measure

Possessions per 48 minutes — how fast the game was played. NBA.com

What it takes
  • folds: sum(pace) avg(pace) min(pace) max(pace) count(pace) distinct(pace) only(pace) latest(pace) top(pace) mean(pace) median(pace) mode(pace)
  • ranks: pace_percentile
  • accumulates: as_of(pace)
  • can be a benchmark
NBA Stats · hoopR
poss Poss integer
measure

Possessions he was on the floor for.

What it takes
  • folds: sum(poss) avg(poss) min(poss) max(poss) count(poss) distinct(poss) only(poss) latest(poss) top(poss) mean(poss) median(poss) mode(poss)
  • ranks: poss_percentile
  • accumulates: as_of(poss)
  • can be a benchmark
NBA Stats · hoopR
ts_pct TS% number
measure

True shooting percentage — points per scoring possession, counting twos, threes and free throws together. The single fairest measure of how efficiently a player scores. NBA.com

What it takes
  • folds: sum(ts_pct) avg(ts_pct) min(ts_pct) max(ts_pct) count(ts_pct) distinct(ts_pct) only(ts_pct) latest(ts_pct) top(ts_pct) mean(ts_pct) median(ts_pct) mode(ts_pct)
  • ranks: ts_pct_percentile
  • accumulates: as_of(ts_pct)
  • can be a benchmark
NBA Stats · hoopR
efg_pct eFG% number
measure

Effective field goal percentage — shooting percentage with a three counted as a basket and a half, because it is worth that. NBA.com

What it takes
  • folds: sum(efg_pct) avg(efg_pct) min(efg_pct) max(efg_pct) count(efg_pct) distinct(efg_pct) only(efg_pct) latest(efg_pct) top(efg_pct) mean(efg_pct) median(efg_pct) mode(efg_pct)
  • ranks: efg_pct_percentile
  • accumulates: as_of(efg_pct)
  • can be a benchmark
NBA Stats · hoopR
reb_pct REB% number
measure

Share of the available rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(reb_pct) avg(reb_pct) min(reb_pct) max(reb_pct) count(reb_pct) distinct(reb_pct) only(reb_pct) latest(reb_pct) top(reb_pct) mean(reb_pct) median(reb_pct) mode(reb_pct)
  • ranks: reb_pct_percentile
  • accumulates: as_of(reb_pct)
  • can be a benchmark
NBA Stats · hoopR
oreb_pct OREB% number
measure

Share of the available offensive rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(oreb_pct) avg(oreb_pct) min(oreb_pct) max(oreb_pct) count(oreb_pct) distinct(oreb_pct) only(oreb_pct) latest(oreb_pct) top(oreb_pct) mean(oreb_pct) median(oreb_pct) mode(oreb_pct)
  • ranks: oreb_pct_percentile
  • accumulates: as_of(oreb_pct)
  • can be a benchmark
NBA Stats · hoopR
tov_pct lower is better TOV% number
measure

Share of the possessions he used that ended in a turnover.

What it takes
  • folds: sum(tov_pct) avg(tov_pct) min(tov_pct) max(tov_pct) count(tov_pct) distinct(tov_pct) only(tov_pct) latest(tov_pct) top(tov_pct) mean(tov_pct) median(tov_pct) mode(tov_pct)
  • ranks: tov_pct_percentile
  • accumulates: as_of(tov_pct)
  • can be a benchmark
NBA Stats · hoopR
ast_to AST/TO number
measure

Assists per turnover. NBA.com

What it takes
  • folds: sum(ast_to) avg(ast_to) min(ast_to) max(ast_to) count(ast_to) distinct(ast_to) only(ast_to) latest(ast_to) top(ast_to) mean(ast_to) median(ast_to) mode(ast_to)
  • ranks: ast_to_percentile
  • accumulates: as_of(ast_to)
  • can be a benchmark
NBA Stats · hoopR
pie PIE number
measure

Player impact estimate — a share of everything statistical that happened in the game, as one percentage. NBA.com

What it takes
  • folds: sum(pie) avg(pie) min(pie) max(pie) count(pie) distinct(pie) only(pie) latest(pie) top(pie) mean(pie) median(pie) mode(pie)
  • ranks: pie_percentile
  • accumulates: as_of(pie)
  • can be a benchmark
NBA Stats · hoopR
fta_rate FTA Rate number
measure

Free-throw attempts per field-goal attempt — how often a club gets to the line.

Free-throw attempts per field-goal attempt

What it takes
  • folds: sum(fta_rate) avg(fta_rate) min(fta_rate) max(fta_rate) count(fta_rate) distinct(fta_rate) only(fta_rate) latest(fta_rate) top(fta_rate) mean(fta_rate) median(fta_rate) mode(fta_rate)
  • ranks: fta_rate_percentile
  • can be a benchmark
NBA Stats · hoopR
opp_efg_pct lower is better Opp eFG% number
measure

The opponents' effective field-goal percentage — one of the four factors.

What it takes
  • folds: sum(opp_efg_pct) avg(opp_efg_pct) min(opp_efg_pct) max(opp_efg_pct) count(opp_efg_pct) distinct(opp_efg_pct) only(opp_efg_pct) latest(opp_efg_pct) top(opp_efg_pct) mean(opp_efg_pct) median(opp_efg_pct) mode(opp_efg_pct)
  • ranks: opp_efg_pct_percentile
  • can be a benchmark
NBA Stats · hoopR
opp_tov_pct Opp TOV% number
measure

Share of opponent possessions that ended in a turnover — one of the four factors.

Share of opponent possessions it forced a turnover on

What it takes
  • folds: sum(opp_tov_pct) avg(opp_tov_pct) min(opp_tov_pct) max(opp_tov_pct) count(opp_tov_pct) distinct(opp_tov_pct) only(opp_tov_pct) latest(opp_tov_pct) top(opp_tov_pct) mean(opp_tov_pct) median(opp_tov_pct) mode(opp_tov_pct)
  • ranks: opp_tov_pct_percentile
  • can be a benchmark
NBA Stats · hoopR
opp_oreb_pct lower is better Opp OREB% number
measure

Share of their own misses the opponents rebounded.

What it takes
  • folds: sum(opp_oreb_pct) avg(opp_oreb_pct) min(opp_oreb_pct) max(opp_oreb_pct) count(opp_oreb_pct) distinct(opp_oreb_pct) only(opp_oreb_pct) latest(opp_oreb_pct) top(opp_oreb_pct) mean(opp_oreb_pct) median(opp_oreb_pct) mode(opp_oreb_pct)
  • ranks: opp_oreb_pct_percentile
  • can be a benchmark
NBA Stats · hoopR
opp_fta_rate lower is better Opp FTA Rate number
measure

How often the opponents got to the line, per field-goal attempt.

What it takes
  • folds: sum(opp_fta_rate) avg(opp_fta_rate) min(opp_fta_rate) max(opp_fta_rate) count(opp_fta_rate) distinct(opp_fta_rate) only(opp_fta_rate) latest(opp_fta_rate) top(opp_fta_rate) mean(opp_fta_rate) median(opp_fta_rate) mode(opp_fta_rate)
  • ranks: opp_fta_rate_percentile
  • can be a benchmark
NBA Stats · hoopR
opp_pts lower is better Opp Pts integer
measure

Points the opponents scored.

What it takes
  • folds: sum(opp_pts) avg(opp_pts) min(opp_pts) max(opp_pts) count(opp_pts) distinct(opp_pts) only(opp_pts) latest(opp_pts) top(opp_pts) mean(opp_pts) median(opp_pts) mode(opp_pts)
  • ranks: opp_pts_percentile
  • accumulates: as_of(opp_pts)
  • can be a benchmark
NBA Stats · hoopR
opp_fgm lower is better Opp FGM integer
measure

Field goals the opponents made.

What it takes
  • folds: sum(opp_fgm) avg(opp_fgm) min(opp_fgm) max(opp_fgm) count(opp_fgm) distinct(opp_fgm) only(opp_fgm) latest(opp_fgm) top(opp_fgm) mean(opp_fgm) median(opp_fgm) mode(opp_fgm)
  • ranks: opp_fgm_percentile
  • accumulates: as_of(opp_fgm)
  • can be a benchmark
NBA Stats · hoopR
opp_fga Opp FGA integer
measure

Field goals the opponents attempted.

What it takes
  • folds: sum(opp_fga) avg(opp_fga) min(opp_fga) max(opp_fga) count(opp_fga) distinct(opp_fga) only(opp_fga) latest(opp_fga) top(opp_fga) mean(opp_fga) median(opp_fga) mode(opp_fga)
  • ranks: opp_fga_percentile
  • accumulates: as_of(opp_fga)
  • can be a benchmark
NBA Stats · hoopR
opp_fg_pct lower is better Opp FG% number
measure

The opponents' field-goal percentage.

What it takes
  • folds: sum(opp_fg_pct) avg(opp_fg_pct) min(opp_fg_pct) max(opp_fg_pct) count(opp_fg_pct) distinct(opp_fg_pct) only(opp_fg_pct) latest(opp_fg_pct) top(opp_fg_pct) mean(opp_fg_pct) median(opp_fg_pct) mode(opp_fg_pct)
  • ranks: opp_fg_pct_percentile
  • can be a benchmark
NBA Stats · hoopR
opp_fg3m lower is better Opp 3PM integer
measure

Threes the opponents made.

What it takes
  • folds: sum(opp_fg3m) avg(opp_fg3m) min(opp_fg3m) max(opp_fg3m) count(opp_fg3m) distinct(opp_fg3m) only(opp_fg3m) latest(opp_fg3m) top(opp_fg3m) mean(opp_fg3m) median(opp_fg3m) mode(opp_fg3m)
  • ranks: opp_fg3m_percentile
  • accumulates: as_of(opp_fg3m)
  • can be a benchmark
NBA Stats · hoopR
opp_fg3_pct lower is better Opp 3P% number
measure

The opponents' three-point percentage.

What it takes
  • folds: sum(opp_fg3_pct) avg(opp_fg3_pct) min(opp_fg3_pct) max(opp_fg3_pct) count(opp_fg3_pct) distinct(opp_fg3_pct) only(opp_fg3_pct) latest(opp_fg3_pct) top(opp_fg3_pct) mean(opp_fg3_pct) median(opp_fg3_pct) mode(opp_fg3_pct)
  • ranks: opp_fg3_pct_percentile
  • can be a benchmark
NBA Stats · hoopR
opp_reb lower is better Opp Reb integer
measure

Rebounds the opponents took.

What it takes
  • folds: sum(opp_reb) avg(opp_reb) min(opp_reb) max(opp_reb) count(opp_reb) distinct(opp_reb) only(opp_reb) latest(opp_reb) top(opp_reb) mean(opp_reb) median(opp_reb) mode(opp_reb)
  • ranks: opp_reb_percentile
  • accumulates: as_of(opp_reb)
  • can be a benchmark
NBA Stats · hoopR
opp_ast lower is better Opp Ast integer
measure

Assists the opponents recorded.

What it takes
  • folds: sum(opp_ast) avg(opp_ast) min(opp_ast) max(opp_ast) count(opp_ast) distinct(opp_ast) only(opp_ast) latest(opp_ast) top(opp_ast) mean(opp_ast) median(opp_ast) mode(opp_ast)
  • ranks: opp_ast_percentile
  • accumulates: as_of(opp_ast)
  • can be a benchmark
NBA Stats · hoopR
opp_turnovers Opp TOV integer
measure

Times the opponents lost the ball.

What it takes
  • folds: sum(opp_turnovers) avg(opp_turnovers) min(opp_turnovers) max(opp_turnovers) count(opp_turnovers) distinct(opp_turnovers) only(opp_turnovers) latest(opp_turnovers) top(opp_turnovers) mean(opp_turnovers) median(opp_turnovers) mode(opp_turnovers)
  • ranks: opp_turnovers_percentile
  • accumulates: as_of(opp_turnovers)
  • can be a benchmark
NBA Stats · hoopR
pts_paint Paint integer
measure

Points scored in the paint.

What it takes
  • folds: sum(pts_paint) avg(pts_paint) min(pts_paint) max(pts_paint) count(pts_paint) distinct(pts_paint) only(pts_paint) latest(pts_paint) top(pts_paint) mean(pts_paint) median(pts_paint) mode(pts_paint)
  • ranks: pts_paint_percentile
  • accumulates: as_of(pts_paint)
  • can be a benchmark
NBA Stats · hoopR
pts_fb FB integer
measure

Points scored on the fast break.

What it takes
  • folds: sum(pts_fb) avg(pts_fb) min(pts_fb) max(pts_fb) count(pts_fb) distinct(pts_fb) only(pts_fb) latest(pts_fb) top(pts_fb) mean(pts_fb) median(pts_fb) mode(pts_fb)
  • ranks: pts_fb_percentile
  • accumulates: as_of(pts_fb)
  • can be a benchmark
NBA Stats · hoopR
pts_off_tov Off TOV integer
measure

Points scored off the opponent's turnovers.

What it takes
  • folds: sum(pts_off_tov) avg(pts_off_tov) min(pts_off_tov) max(pts_off_tov) count(pts_off_tov) distinct(pts_off_tov) only(pts_off_tov) latest(pts_off_tov) top(pts_off_tov) mean(pts_off_tov) median(pts_off_tov) mode(pts_off_tov)
  • ranks: pts_off_tov_percentile
  • accumulates: as_of(pts_off_tov)
  • can be a benchmark
NBA Stats · hoopR
pts_2nd_chance 2nd integer
measure

Points scored after an offensive rebound.

What it takes
  • folds: sum(pts_2nd_chance) avg(pts_2nd_chance) min(pts_2nd_chance) max(pts_2nd_chance) count(pts_2nd_chance) distinct(pts_2nd_chance) only(pts_2nd_chance) latest(pts_2nd_chance) top(pts_2nd_chance) mean(pts_2nd_chance) median(pts_2nd_chance) mode(pts_2nd_chance)
  • ranks: pts_2nd_chance_percentile
  • accumulates: as_of(pts_2nd_chance)
  • can be a benchmark
NBA Stats · hoopR
pct_pts_3pt %Pts 3 number
measure

Share of his points that came from three.

What it takes
  • folds: sum(pct_pts_3pt) avg(pct_pts_3pt) min(pct_pts_3pt) max(pct_pts_3pt) count(pct_pts_3pt) distinct(pct_pts_3pt) only(pct_pts_3pt) latest(pct_pts_3pt) top(pct_pts_3pt) mean(pct_pts_3pt) median(pct_pts_3pt) mode(pct_pts_3pt)
  • ranks: pct_pts_3pt_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_pts_paint %Pts Paint number
measure

Share of his points scored in the paint.

What it takes
  • folds: sum(pct_pts_paint) avg(pct_pts_paint) min(pct_pts_paint) max(pct_pts_paint) count(pct_pts_paint) distinct(pct_pts_paint) only(pct_pts_paint) latest(pct_pts_paint) top(pct_pts_paint) mean(pct_pts_paint) median(pct_pts_paint) mode(pct_pts_paint)
  • ranks: pct_pts_paint_percentile
  • can be a benchmark
NBA Stats · hoopR
pct_ast_fgm %Ast number
measure

Share of his made field goals that somebody assisted.

What it takes
  • folds: sum(pct_ast_fgm) avg(pct_ast_fgm) min(pct_ast_fgm) max(pct_ast_fgm) count(pct_ast_fgm) distinct(pct_ast_fgm) only(pct_ast_fgm) latest(pct_ast_fgm) top(pct_ast_fgm) mean(pct_ast_fgm) median(pct_ast_fgm) mode(pct_ast_fgm)
  • ranks: pct_ast_fgm_percentile
  • can be a benchmark
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · hoopR
Rates this table names 2

ppg PPG

built from sum(pts) sum(games)

Points per game played.

from nba.teams
select team, ppg
group by team
order by ppg desc
limit 10

opp_ppg Opp PPG

built from sum(opp_pts) sum(games)

Points allowed per game.

from nba.teams
select team, opp_ppg
group by team
order by opp_ppg desc
limit 10
Operators on this table 38 available, 5 not

from

The one table a query reads

from nba.teams
select team, season, wins, losses, off_rating, def_rating, net_rating, pace
order by net_rating desc
limit 100

select

The columns the answer carries

from nba.teams
select team, season, wins, losses, off_rating, def_rating, net_rating, pace
order by net_rating desc
limit 100

as

Renames a column's heading and nothing else

from nba.teams
select team, season, wins as W
order by wins desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.teams
where season = $year
select team, season, wins
order by wins desc
limit 10

limit

How many rows come back

from nba.teams
select team, season, wins, losses, off_rating, def_rating, net_rating, pace
order by net_rating desc
limit 100

order by

Which end of the answer comes first

from nba.teams
select team, season, wins
order by wins desc
limit 10

#

A comment, to the end of the line

# Club seasons — One row per club per season since 1996-97: its own line, its opponents', and the four factors.
from nba.teams
select team, season, wins, losses, off_rating, def_rating, net_rating, pace
order by net_rating desc
limit 100

where

Chooses the rows the question is about

from nba.teams
where season = 2026
select team, wins
order by wins desc
limit 10

and

Continues whichever filter clause came last

from nba.teams
where season = 2026 and wins > 0
select team, wins
order by wins desc
limit 10

having

Filters the groups a fold made

from nba.teams
select team, sum(wins)
group by team
having sum(wins) > 0
order by sum(wins) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.teams
where season = 2026
select team, wins, wins_percentile
keep wins_percentile >= 90
order by wins_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.teams
select team, season, wins
highlight season = 2026
order by wins desc
limit 10

of

A threshold that is another row rather than a number

from nba.teams
where wins >= max(wins) of season 2026
select team, wins
order by wins desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.teams
select team, count(*), sum(wins)
group by team
order by sum(wins) desc
limit 10

then

Folds the answer a second time

from nba.teams
select team, season, count(*)
group by team, season
having count(*) > 10
then
select team, count(*) as Seasons
group by team
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.teams
select team, season, sum(wins)
group by team, season
pivot by season
limit 25

first / last

Only part of each career, before anything else runs

from nba.teams
first 3 seasons
select team, sum(wins)
group by team
order by sum(wins) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.teams
select team, sum(wins)
group by team
order by sum(wins) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.teams
select team, avg(wins)
group by team
order by avg(wins) desc
limit 10

min(…)

The smallest value in each group

from nba.teams
select team, min(wins)
group by team
order by min(wins) desc
limit 10

max(…)

The largest value in each group

from nba.teams
select team, max(wins)
group by team
order by max(wins) desc
limit 10

count(…)

How many rows a group swallowed

from nba.teams
select team, count(wins)
group by team
order by count(wins) desc
limit 10

distinct(…)

How many different values a group holds

from nba.teams
select team, distinct(season)
group by team
order by distinct(season) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.teams
where season = 2026
select team, only(season)
group by team
order by only(season) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.teams
select team, latest(team)
group by team
order by count(*) desc
limit 10

top(…)

The value on the group's biggest row

from nba.teams
select team, top(team)
group by team
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.teams
select team, mean(wins)
group by team
order by mean(wins) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.teams
select team, median(wins)
group by team
order by median(wins) desc
limit 10

mode(…)

The commonest value in the group

from nba.teams
select team, mode(team)
group by team
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.teams
where season = 2026
select team, wins, wins_percentile
order by wins_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.teams
select team, sum(wins), percentile(sum(wins))
group by team
order by sum(wins) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.teams
where season = 2026
select team, wins, standing(wins)
order by wins desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.teams
where season = 2026
select team, playoff_rank, games, composite(playoff_rank, games)
order by composite(playoff_rank, games) desc
limit 10

ratio(…)

One column divided by another

from nba.teams
select team, count(*), ratio(sum(wins), count(*))
group by team
order by ratio(sum(wins), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.teams
where season = 2026
select team, playoff_rank, games, calc(standing(playoff_rank) - standing(games))
order by calc(standing(playoff_rank) - standing(games)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.teams
select team, wins, format(wins, > 0 -> "on the board", <= 0 -> "nothing yet")
order by wins desc
limit 10

pair

Draws two columns of the answer in one

from nba.teams
where season = 2026
select team, wins, wins_percentile
pair wins with wins_percentile
order by wins desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.teams
where season = 2026
select team, playoff_rank, games, wins, composite(playoff_rank, games, wins) as Score
hint composite(playoff_rank, games, wins) as "Seed + GP + W"
order by composite(playoff_rank, games, wins) desc
limit 10

Not on this table

  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along

nba.team_games Team box scores

One row per team per game.

from nba.team_games
select game_date, team, opponent, pts, opp_pts, off_rating, def_rating, pace
order by game_date desc
limit 200
One row is
one team's game (team-game)
Built from
one table, read straight
Reads
nba_team_games NBA Stats, hoopR
Shows by default
game_date team opponent pts opp_pts off_rating def_rating pace
Ordered by
game_date desc
Rows
200 by default, 10000 at most
Ranks within
season
Careers counted in
seasons game_dates games
Newest row
game_date

Applied unless you say otherwise

  • Limited to the regular season — add where season_type = Playoffs to change it.
Dimensions 5
NameBound to
league always nba
team the team column
player This dataset is one row per team — query nba.player_games for players
position Positions belong to players, and this dataset has no players
season the season column
Columns 44
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
season_type completes season_type Type string
dimension

Whether the game was a regular-season, play-in or playoff game.

Regular Season, Playoffs or PlayIn

What it takes
  • folds: count(season_type) distinct(season_type) only(season_type) latest(season_type) mode(season_type)
NBA Stats · hoopR
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) mode(team)
NBA Stats · hoopR
game_date Date date
dimension

The date the game was played.

What it takes
  • folds: min(game_date) max(game_date) count(game_date) distinct(game_date) only(game_date) latest(game_date) mode(game_date)
  • periods: year(game_date) quarter(game_date) month(game_date) week(game_date)
  • can be a benchmark
NBA Stats · hoopR
home Home boolean
dimension

Whether this club was at home.

What it takes
  • folds: count(home) distinct(home) only(home) latest(home) mode(home)
NBA Stats · hoopR
pts PTS integer
measure

Points scored. NBA.com

What it takes
  • folds: sum(pts) avg(pts) min(pts) max(pts) count(pts) distinct(pts) only(pts) latest(pts) mean(pts) median(pts) mode(pts)
  • ranks: pts_percentile
  • accumulates: as_of(pts)
  • can be a benchmark
NBA Stats · hoopR
reb REB integer
measure

Rebounds. NBA.com

What it takes
  • folds: sum(reb) avg(reb) min(reb) max(reb) count(reb) distinct(reb) only(reb) latest(reb) mean(reb) median(reb) mode(reb)
  • ranks: reb_percentile
  • accumulates: as_of(reb)
  • can be a benchmark
NBA Stats · hoopR
oreb OREB integer
measure

Rebounds of the shooting team's own misses. NBA.com

What it takes
  • folds: sum(oreb) avg(oreb) min(oreb) max(oreb) count(oreb) distinct(oreb) only(oreb) latest(oreb) mean(oreb) median(oreb) mode(oreb)
  • ranks: oreb_percentile
  • accumulates: as_of(oreb)
  • can be a benchmark
NBA Stats · hoopR
dreb DREB integer
measure

Rebounds of the opponent's misses. NBA.com

What it takes
  • folds: sum(dreb) avg(dreb) min(dreb) max(dreb) count(dreb) distinct(dreb) only(dreb) latest(dreb) mean(dreb) median(dreb) mode(dreb)
  • ranks: dreb_percentile
  • accumulates: as_of(dreb)
  • can be a benchmark
NBA Stats · hoopR
ast AST integer
measure

Assists — passes that led directly to a basket. NBA.com

What it takes
  • folds: sum(ast) avg(ast) min(ast) max(ast) count(ast) distinct(ast) only(ast) latest(ast) mean(ast) median(ast) mode(ast)
  • ranks: ast_percentile
  • accumulates: as_of(ast)
  • can be a benchmark
NBA Stats · hoopR
stl STL integer
measure

Steals. NBA.com

What it takes
  • folds: sum(stl) avg(stl) min(stl) max(stl) count(stl) distinct(stl) only(stl) latest(stl) mean(stl) median(stl) mode(stl)
  • ranks: stl_percentile
  • accumulates: as_of(stl)
  • can be a benchmark
NBA Stats · hoopR
blk BLK integer
measure

Shots blocked. NBA.com

What it takes
  • folds: sum(blk) avg(blk) min(blk) max(blk) count(blk) distinct(blk) only(blk) latest(blk) mean(blk) median(blk) mode(blk)
  • ranks: blk_percentile
  • accumulates: as_of(blk)
  • can be a benchmark
NBA Stats · hoopR
tov lower is better TOV integer
measure

Turnovers. NBA.com

What it takes
  • folds: sum(tov) avg(tov) min(tov) max(tov) count(tov) distinct(tov) only(tov) latest(tov) mean(tov) median(tov) mode(tov)
  • ranks: tov_percentile
  • accumulates: as_of(tov)
  • can be a benchmark
NBA Stats · hoopR
pf lower is better PF integer
measure

Fouls committed. NBA.com

What it takes
  • folds: sum(pf) avg(pf) min(pf) max(pf) count(pf) distinct(pf) only(pf) latest(pf) mean(pf) median(pf) mode(pf)
  • ranks: pf_percentile
  • accumulates: as_of(pf)
  • can be a benchmark
NBA Stats · hoopR
fgm FGM integer
measure

Field goals made — every basket except a free throw. NBA.com

What it takes
  • folds: sum(fgm) avg(fgm) min(fgm) max(fgm) count(fgm) distinct(fgm) only(fgm) latest(fgm) mean(fgm) median(fgm) mode(fgm)
  • ranks: fgm_percentile
  • accumulates: as_of(fgm)
  • can be a benchmark
NBA Stats · hoopR
fga FGA integer
measure

Field goals attempted. NBA.com

What it takes
  • folds: sum(fga) avg(fga) min(fga) max(fga) count(fga) distinct(fga) only(fga) latest(fga) mean(fga) median(fga) mode(fga)
  • ranks: fga_percentile
  • accumulates: as_of(fga)
  • can be a benchmark
NBA Stats · hoopR
fg3m 3PM integer
measure

Three-pointers made. NBA.com

What it takes
  • folds: sum(fg3m) avg(fg3m) min(fg3m) max(fg3m) count(fg3m) distinct(fg3m) only(fg3m) latest(fg3m) mean(fg3m) median(fg3m) mode(fg3m)
  • ranks: fg3m_percentile
  • accumulates: as_of(fg3m)
  • can be a benchmark
NBA Stats · hoopR
fg3a 3PA integer
measure

Three-pointers attempted. NBA.com

What it takes
  • folds: sum(fg3a) avg(fg3a) min(fg3a) max(fg3a) count(fg3a) distinct(fg3a) only(fg3a) latest(fg3a) mean(fg3a) median(fg3a) mode(fg3a)
  • ranks: fg3a_percentile
  • accumulates: as_of(fg3a)
  • can be a benchmark
NBA Stats · hoopR
ftm FTM integer
measure

Free throws made. NBA.com

What it takes
  • folds: sum(ftm) avg(ftm) min(ftm) max(ftm) count(ftm) distinct(ftm) only(ftm) latest(ftm) mean(ftm) median(ftm) mode(ftm)
  • ranks: ftm_percentile
  • accumulates: as_of(ftm)
  • can be a benchmark
NBA Stats · hoopR
fta FTA integer
measure

Free throws attempted. NBA.com

What it takes
  • folds: sum(fta) avg(fta) min(fta) max(fta) count(fta) distinct(fta) only(fta) latest(fta) mean(fta) median(fta) mode(fta)
  • ranks: fta_percentile
  • accumulates: as_of(fta)
  • can be a benchmark
NBA Stats · hoopR
fg_pct FG% number
measure

Share of field goals that went in. NBA.com

What it takes
  • folds: sum(fg_pct) avg(fg_pct) min(fg_pct) max(fg_pct) count(fg_pct) distinct(fg_pct) only(fg_pct) latest(fg_pct) mean(fg_pct) median(fg_pct) mode(fg_pct)
  • ranks: fg_pct_percentile
  • accumulates: as_of(fg_pct)
  • can be a benchmark
NBA Stats · hoopR
fg3_pct 3P% number
measure

Share of three-pointers that went in. NBA.com

What it takes
  • folds: sum(fg3_pct) avg(fg3_pct) min(fg3_pct) max(fg3_pct) count(fg3_pct) distinct(fg3_pct) only(fg3_pct) latest(fg3_pct) mean(fg3_pct) median(fg3_pct) mode(fg3_pct)
  • ranks: fg3_pct_percentile
  • accumulates: as_of(fg3_pct)
  • can be a benchmark
NBA Stats · hoopR
ft_pct FT% number
measure

Share of free throws that went in. NBA.com

What it takes
  • folds: sum(ft_pct) avg(ft_pct) min(ft_pct) max(ft_pct) count(ft_pct) distinct(ft_pct) only(ft_pct) latest(ft_pct) mean(ft_pct) median(ft_pct) mode(ft_pct)
  • ranks: ft_pct_percentile
  • accumulates: as_of(ft_pct)
  • can be a benchmark
NBA Stats · hoopR
efg_pct eFG% number
measure

Effective field goal percentage — shooting percentage with a three counted as a basket and a half, because it is worth that. NBA.com

What it takes
  • folds: sum(efg_pct) avg(efg_pct) min(efg_pct) max(efg_pct) count(efg_pct) distinct(efg_pct) only(efg_pct) latest(efg_pct) mean(efg_pct) median(efg_pct) mode(efg_pct)
  • ranks: efg_pct_percentile
  • accumulates: as_of(efg_pct)
  • can be a benchmark
NBA Stats · hoopR
ts_pct TS% number
measure

True shooting percentage — points per scoring possession, counting twos, threes and free throws together. The single fairest measure of how efficiently a player scores. NBA.com

What it takes
  • folds: sum(ts_pct) avg(ts_pct) min(ts_pct) max(ts_pct) count(ts_pct) distinct(ts_pct) only(ts_pct) latest(ts_pct) mean(ts_pct) median(ts_pct) mode(ts_pct)
  • ranks: ts_pct_percentile
  • accumulates: as_of(ts_pct)
  • can be a benchmark
NBA Stats · hoopR
usg_pct USG% number
measure

Usage rate — the share of the club's possessions finished while on the floor, by shooting, drawing a foul or turning it over. NBA.com

What it takes
  • folds: sum(usg_pct) avg(usg_pct) min(usg_pct) max(usg_pct) count(usg_pct) distinct(usg_pct) only(usg_pct) latest(usg_pct) mean(usg_pct) median(usg_pct) mode(usg_pct)
  • ranks: usg_pct_percentile
  • accumulates: as_of(usg_pct)
  • can be a benchmark
NBA Stats · hoopR
reb_pct REB% number
measure

Share of the available rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(reb_pct) avg(reb_pct) min(reb_pct) max(reb_pct) count(reb_pct) distinct(reb_pct) only(reb_pct) latest(reb_pct) mean(reb_pct) median(reb_pct) mode(reb_pct)
  • ranks: reb_pct_percentile
  • accumulates: as_of(reb_pct)
  • can be a benchmark
NBA Stats · hoopR
oreb_pct OREB% number
measure

Share of the available offensive rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(oreb_pct) avg(oreb_pct) min(oreb_pct) max(oreb_pct) count(oreb_pct) distinct(oreb_pct) only(oreb_pct) latest(oreb_pct) mean(oreb_pct) median(oreb_pct) mode(oreb_pct)
  • ranks: oreb_pct_percentile
  • accumulates: as_of(oreb_pct)
  • can be a benchmark
NBA Stats · hoopR
dreb_pct DREB% number
measure

Share of the available defensive rebounds taken while on the floor. NBA.com

What it takes
  • folds: sum(dreb_pct) avg(dreb_pct) min(dreb_pct) max(dreb_pct) count(dreb_pct) distinct(dreb_pct) only(dreb_pct) latest(dreb_pct) mean(dreb_pct) median(dreb_pct) mode(dreb_pct)
  • ranks: dreb_pct_percentile
  • accumulates: as_of(dreb_pct)
  • can be a benchmark
NBA Stats · hoopR
ast_pct AST% number
measure

Share of the baskets assisted while on the floor. NBA.com

What it takes
  • folds: sum(ast_pct) avg(ast_pct) min(ast_pct) max(ast_pct) count(ast_pct) distinct(ast_pct) only(ast_pct) latest(ast_pct) mean(ast_pct) median(ast_pct) mode(ast_pct)
  • ranks: ast_pct_percentile
  • accumulates: as_of(ast_pct)
  • can be a benchmark
NBA Stats · hoopR
ast_to AST/TO number
measure

Assists per turnover. NBA.com

What it takes
  • folds: sum(ast_to) avg(ast_to) min(ast_to) max(ast_to) count(ast_to) distinct(ast_to) only(ast_to) latest(ast_to) mean(ast_to) median(ast_to) mode(ast_to)
  • ranks: ast_to_percentile
  • accumulates: as_of(ast_to)
  • can be a benchmark
NBA Stats · hoopR
off_rating ORtg number
measure

Points scored per 100 possessions while on the floor. NBA.com

What it takes
  • folds: sum(off_rating) avg(off_rating) min(off_rating) max(off_rating) count(off_rating) distinct(off_rating) only(off_rating) latest(off_rating) mean(off_rating) median(off_rating) mode(off_rating)
  • ranks: off_rating_percentile
  • accumulates: as_of(off_rating)
  • can be a benchmark
NBA Stats · hoopR
def_rating lower is better DRtg number
measure

Points allowed per 100 possessions while on the floor. NBA.com

What it takes
  • folds: sum(def_rating) avg(def_rating) min(def_rating) max(def_rating) count(def_rating) distinct(def_rating) only(def_rating) latest(def_rating) mean(def_rating) median(def_rating) mode(def_rating)
  • ranks: def_rating_percentile
  • accumulates: as_of(def_rating)
  • can be a benchmark
NBA Stats · hoopR
net_rating NetRtg number
measure

Offensive rating less defensive rating. NBA.com

What it takes
  • folds: sum(net_rating) avg(net_rating) min(net_rating) max(net_rating) count(net_rating) distinct(net_rating) only(net_rating) latest(net_rating) mean(net_rating) median(net_rating) mode(net_rating)
  • ranks: net_rating_percentile
  • accumulates: as_of(net_rating)
  • can be a benchmark
NBA Stats · hoopR
pace Pace number
measure

Possessions per 48 minutes — how fast the game was played. NBA.com

What it takes
  • folds: sum(pace) avg(pace) min(pace) max(pace) count(pace) distinct(pace) only(pace) latest(pace) mean(pace) median(pace) mode(pace)
  • ranks: pace_percentile
  • accumulates: as_of(pace)
  • can be a benchmark
NBA Stats · hoopR
pie PIE number
measure

Player impact estimate — a share of everything statistical that happened in the game, as one percentage. NBA.com

What it takes
  • folds: sum(pie) avg(pie) min(pie) max(pie) count(pie) distinct(pie) only(pie) latest(pie) mean(pie) median(pie) mode(pie)
  • ranks: pie_percentile
  • accumulates: as_of(pie)
  • can be a benchmark
NBA Stats · hoopR
plus_minus +/- integer
measure

How much the club outscored the opponent by over the minutes counted. NBA.com

What it takes
  • folds: sum(plus_minus) avg(plus_minus) min(plus_minus) max(plus_minus) count(plus_minus) distinct(plus_minus) only(plus_minus) latest(plus_minus) mean(plus_minus) median(plus_minus) mode(plus_minus)
  • ranks: plus_minus_percentile
  • accumulates: as_of(plus_minus)
  • can be a benchmark
NBA Stats · hoopR
won W integer
measure

Whether the club won.

1 if the club won this game, taken from the final margin

A game with no margin recorded counts for neither side

What it takes
  • folds: sum(won) avg(won) min(won) max(won) count(won) distinct(won) only(won) latest(won) mean(won) median(won) mode(won)
  • ranks: won_percentile
  • accumulates: as_of(won)
  • can be a benchmark
NBA Stats · hoopR
opponent completes team Opp string
dimension

The other club.

What it takes
  • folds: count(opponent) distinct(opponent) only(opponent) latest(opponent) mode(opponent)
NBA Stats · hoopR
opp_pts lower is better Opp Pts integer
measure

Points the opponents scored.

What it takes
  • folds: sum(opp_pts) avg(opp_pts) min(opp_pts) max(opp_pts) count(opp_pts) distinct(opp_pts) only(opp_pts) latest(opp_pts) mean(opp_pts) median(opp_pts) mode(opp_pts)
  • ranks: opp_pts_percentile
  • accumulates: as_of(opp_pts)
  • can be a benchmark
NBA Stats · hoopR
margin Marg integer
measure

Points scored less points allowed in this game.

Points scored less points allowed

What it takes
  • folds: sum(margin) avg(margin) min(margin) max(margin) count(margin) distinct(margin) only(margin) latest(margin) mean(margin) median(margin) mode(margin)
  • ranks: margin_percentile
  • accumulates: as_of(margin)
  • can be a benchmark
NBA Stats · hoopR
off_poss Off Poss integer
measure

Possessions the club had the ball for.

Possessions the club had the ball for

What it takes
  • folds: sum(off_poss) avg(off_poss) min(off_poss) max(off_poss) count(off_poss) distinct(off_poss) only(off_poss) latest(off_poss) mean(off_poss) median(off_poss) mode(off_poss)
  • ranks: off_poss_percentile
  • accumulates: as_of(off_poss)
  • can be a benchmark
NBA Stats · hoopR
def_poss Def Poss integer
measure

Possessions the club defended.

What it takes
  • folds: sum(def_poss) avg(def_poss) min(def_poss) max(def_poss) count(def_poss) distinct(def_poss) only(def_poss) latest(def_poss) mean(def_poss) median(def_poss) mode(def_poss)
  • ranks: def_poss_percentile
  • accumulates: as_of(def_poss)
  • can be a benchmark
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
Operators on this table 42 available, 1 not

from

The one table a query reads

from nba.team_games
select game_date, team, opponent, pts, opp_pts, off_rating, def_rating, pace
order by game_date desc
limit 200

select

The columns the answer carries

from nba.team_games
select game_date, team, opponent, pts, opp_pts, off_rating, def_rating, pace
order by game_date desc
limit 200

as

Renames a column's heading and nothing else

from nba.team_games
select game_date, team, pts as PTS
order by pts desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.team_games
where season = $year
select game_date, team, opponent
order by pts desc
limit 10

limit

How many rows come back

from nba.team_games
select game_date, team, opponent, pts, opp_pts, off_rating, def_rating, pace
order by game_date desc
limit 200

order by

Which end of the answer comes first

from nba.team_games
select game_date, team, opponent, pts
order by pts desc
limit 10

#

A comment, to the end of the line

# Team box scores — One row per team per game.
from nba.team_games
select game_date, team, opponent, pts, opp_pts, off_rating, def_rating, pace
order by game_date desc
limit 200

where

Chooses the rows the question is about

from nba.team_games
where season = 2026
select team, pts
order by pts desc
limit 10

and

Continues whichever filter clause came last

from nba.team_games
where season = 2026 and pts > 0
select team, pts
order by pts desc
limit 10

having

Filters the groups a fold made

from nba.team_games
select team, sum(pts)
group by team
having sum(pts) > 0
order by sum(pts) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.team_games
where season = 2026
select team, pts, pts_percentile
keep pts_percentile >= 90
order by pts_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.team_games
select team, season, pts
highlight season = 2026
order by pts desc
limit 10

of

A threshold that is another row rather than a number

from nba.team_games
where pts >= max(pts) of season 2026
select team, pts
order by pts desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.team_games
select team, count(*), sum(pts)
group by team
order by sum(pts) desc
limit 10

then

Folds the answer a second time

from nba.team_games
select team, opponent, count(*)
group by team, opponent
having count(*) > 10
then
select team, count(*) as Opps
group by team
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.team_games
select team, opponent, sum(pts)
group by team, opponent
pivot by opponent
limit 25

first / last

Only part of each career, before anything else runs

from nba.team_games
first 3 seasons
select team, sum(pts)
group by team
order by sum(pts) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.team_games
select team, sum(pts)
group by team
order by sum(pts) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.team_games
select team, avg(pts)
group by team
order by avg(pts) desc
limit 10

min(…)

The smallest value in each group

from nba.team_games
select team, min(pts)
group by team
order by min(pts) desc
limit 10

max(…)

The largest value in each group

from nba.team_games
select team, max(pts)
group by team
order by max(pts) desc
limit 10

count(…)

How many rows a group swallowed

from nba.team_games
select team, count(pts)
group by team
order by count(pts) desc
limit 10

distinct(…)

How many different values a group holds

from nba.team_games
select team, distinct(game_date)
group by team
order by distinct(game_date) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.team_games
where season = 2026
select team, only(game_date)
group by team
order by only(game_date) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.team_games
select team, latest(team)
group by team
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.team_games
select team, mean(pts)
group by team
order by mean(pts) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.team_games
select team, median(pts)
group by team
order by median(pts) desc
limit 10

mode(…)

The commonest value in the group

from nba.team_games
select team, mode(team)
group by team
order by count(*) desc
limit 10

year(…)

Reads a date as the year it falls in

from nba.team_games
select team, year(game_date), sum(pts)
group by team, year(game_date)
order by year(game_date) asc
limit 20

quarter(…)

Reads a date as the quarter it falls in

from nba.team_games
select team, quarter(game_date), sum(pts)
group by team, quarter(game_date)
order by quarter(game_date) asc
limit 20

month(…)

Reads a date as the month it falls in

from nba.team_games
select team, month(game_date), sum(pts)
group by team, month(game_date)
order by month(game_date) asc
limit 20

week(…)

Reads a date as the week it falls in

from nba.team_games
select team, week(game_date), sum(pts)
group by team, week(game_date)
order by week(game_date) asc
limit 20

as_of(…)

The stat as it stood, season to date

from nba.team_games
where season = 2026
select team, month(game_date), as_of(pts)
group by team, month(game_date)
order by month(game_date) asc
limit 25

<stat>_percentile

Where a row sits in its population, 0-100

from nba.team_games
where season = 2026
select team, pts, pts_percentile
order by pts_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.team_games
select team, sum(pts), percentile(sum(pts))
group by team
order by sum(pts) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.team_games
where season = 2026
select team, pts, standing(pts)
order by pts desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.team_games
where season = 2026
select team, pts, reb, composite(pts, reb)
order by composite(pts, reb) desc
limit 10

ratio(…)

One column divided by another

from nba.team_games
select team, count(*), ratio(sum(pts), count(*))
group by team
order by ratio(sum(pts), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.team_games
where season = 2026
select team, pts, reb, calc(standing(pts) - standing(reb))
order by calc(standing(pts) - standing(reb)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.team_games
select team, pts, format(pts, > 0 -> "on the board", <= 0 -> "nothing yet")
order by pts desc
limit 10

pair

Draws two columns of the answer in one

from nba.team_games
where season = 2026
select team, pts, pts_percentile
pair pts with pts_percentile
order by pts desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.team_games
where season = 2026
select team, pts, reb, oreb, composite(pts, reb, oreb) as Score
hint composite(pts, reb, oreb) as "PTS + REB + OREB"
order by composite(pts, reb, oreb) desc
limit 10

Not on this table

  • top(…) — this table does not say which of its rows is the biggest, so there is no top one to pick

nba.standings Standings

Where every club finished, with the splits the league keeps beside it.

from nba.standings
select team, conference, wins, losses, win_pct, playoff_rank, streak, diff_points_pg
order by win_pct desc
limit 40
One row is
one team's season (team-season)
Built from
one table, read straight
Reads
nba_standings NBA Stats, hoopR
Shows by default
team conference wins losses win_pct playoff_rank streak diff_points_pg
Ordered by
win_pct desc
Rows
40 by default, 2000 at most
Ranks within
season
Careers counted in
seasons
Biggest row
wins

Before you trust the numbers

  • The record columns are text the league publishes as text — "29-12" — which is why they read but do not fold.
Dimensions 5
NameBound to
league always nba
team the team column
player The standings have no player
position The standings have no position
season the season column
Columns 31
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) top(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) top(team) mode(team)
NBA Stats · hoopR
team_name Club string
dimension

The club's full name.

What it takes
  • folds: count(team_name) distinct(team_name) only(team_name) latest(team_name) top(team_name) mode(team_name)
NBA Stats · hoopR
conference completes conference Conf string
dimension

East or West.

What it takes
  • folds: count(conference) distinct(conference) only(conference) latest(conference) top(conference) mode(conference)
NBA Stats · hoopR
division completes division Div string
dimension

The division the club plays in.

What it takes
  • folds: count(division) distinct(division) only(division) latest(division) top(division) mode(division)
NBA Stats · hoopR
wins W integer
measure

Wins.

What it takes
  • folds: sum(wins) avg(wins) min(wins) max(wins) count(wins) distinct(wins) only(wins) latest(wins) top(wins) mean(wins) median(wins) mode(wins)
  • ranks: wins_percentile
  • accumulates: as_of(wins)
  • can be a benchmark
NBA Stats · hoopR
losses lower is better L integer
measure

Losses.

What it takes
  • folds: sum(losses) avg(losses) min(losses) max(losses) count(losses) distinct(losses) only(losses) latest(losses) top(losses) mean(losses) median(losses) mode(losses)
  • ranks: losses_percentile
  • accumulates: as_of(losses)
  • can be a benchmark
NBA Stats · hoopR
win_pct W% number
measure

Wins as a share of games played.

What it takes
  • folds: sum(win_pct) avg(win_pct) min(win_pct) max(win_pct) count(win_pct) distinct(win_pct) only(win_pct) latest(win_pct) top(win_pct) mean(win_pct) median(win_pct) mode(win_pct)
  • ranks: win_pct_percentile
  • accumulates: as_of(win_pct)
  • can be a benchmark
NBA Stats · hoopR
playoff_rank lower is better Seed integer
measure

Where the club seeded in its conference.

What it takes
  • folds: sum(playoff_rank) avg(playoff_rank) min(playoff_rank) max(playoff_rank) count(playoff_rank) distinct(playoff_rank) only(playoff_rank) latest(playoff_rank) top(playoff_rank) mean(playoff_rank) median(playoff_rank) mode(playoff_rank)
  • ranks: playoff_rank_percentile
  • accumulates: as_of(playoff_rank)
  • can be a benchmark
NBA Stats · hoopR
division_rank lower is better Div# integer
measure

Where the club finished in its division.

What it takes
  • folds: sum(division_rank) avg(division_rank) min(division_rank) max(division_rank) count(division_rank) distinct(division_rank) only(division_rank) latest(division_rank) top(division_rank) mean(division_rank) median(division_rank) mode(division_rank)
  • ranks: division_rank_percentile
  • accumulates: as_of(division_rank)
  • can be a benchmark
NBA Stats · hoopR
record Record string
dimension

The club's record, as the league writes it.

What it takes
  • folds: count(record) distinct(record) only(record) latest(record) top(record) mode(record)
NBA Stats · hoopR
home Home string
dimension

Whether this club was at home.

What it takes
  • folds: count(home) distinct(home) only(home) latest(home) top(home) mode(home)
NBA Stats · hoopR
road Road string
dimension

Its record away from home.

What it takes
  • folds: count(road) distinct(road) only(road) latest(road) top(road) mode(road)
NBA Stats · hoopR
l10 L10 string
dimension

Its record over the last ten games.

What it takes
  • folds: count(l10) distinct(l10) only(l10) latest(l10) top(l10) mode(l10)
NBA Stats · hoopR
streak Streak string
dimension

Its current run of wins or losses.

What it takes
  • folds: count(streak) distinct(streak) only(streak) latest(streak) top(streak) mode(streak)
NBA Stats · hoopR
conference_record Conf rec string
dimension

Its record against the conference.

What it takes
  • folds: count(conference_record) distinct(conference_record) only(conference_record) latest(conference_record) top(conference_record) mode(conference_record)
NBA Stats · hoopR
division_record Div rec string
dimension

Its record against the division.

What it takes
  • folds: count(division_record) distinct(division_record) only(division_record) latest(division_record) top(division_record) mode(division_record)
NBA Stats · hoopR
clinch Clinch string
dimension

The league's clinch letter for that club.

What it takes
  • folds: count(clinch) distinct(clinch) only(clinch) latest(clinch) top(clinch) mode(clinch)
NBA Stats · hoopR
long_win_streak Long W integer
measure

Its longest winning run of the season.

What it takes
  • folds: sum(long_win_streak) avg(long_win_streak) min(long_win_streak) max(long_win_streak) count(long_win_streak) distinct(long_win_streak) only(long_win_streak) latest(long_win_streak) top(long_win_streak) mean(long_win_streak) median(long_win_streak) mode(long_win_streak)
  • ranks: long_win_streak_percentile
  • accumulates: as_of(long_win_streak)
  • can be a benchmark
NBA Stats · hoopR
long_loss_streak lower is better Long L integer
measure

Its longest losing run of the season.

What it takes
  • folds: sum(long_loss_streak) avg(long_loss_streak) min(long_loss_streak) max(long_loss_streak) count(long_loss_streak) distinct(long_loss_streak) only(long_loss_streak) latest(long_loss_streak) top(long_loss_streak) mean(long_loss_streak) median(long_loss_streak) mode(long_loss_streak)
  • ranks: long_loss_streak_percentile
  • accumulates: as_of(long_loss_streak)
  • can be a benchmark
NBA Stats · hoopR
points_pg PPG number
measure

Points per game.

What it takes
  • folds: sum(points_pg) avg(points_pg) min(points_pg) max(points_pg) count(points_pg) distinct(points_pg) only(points_pg) latest(points_pg) top(points_pg) mean(points_pg) median(points_pg) mode(points_pg)
  • ranks: points_pg_percentile
  • accumulates: as_of(points_pg)
  • can be a benchmark
NBA Stats · hoopR
opp_points_pg lower is better Opp PPG number
measure

Points allowed per game.

What it takes
  • folds: sum(opp_points_pg) avg(opp_points_pg) min(opp_points_pg) max(opp_points_pg) count(opp_points_pg) distinct(opp_points_pg) only(opp_points_pg) latest(opp_points_pg) top(opp_points_pg) mean(opp_points_pg) median(opp_points_pg) mode(opp_points_pg)
  • ranks: opp_points_pg_percentile
  • accumulates: as_of(opp_points_pg)
  • can be a benchmark
NBA Stats · hoopR
diff_points_pg Diff number
measure

Points scored less points allowed, per game.

What it takes
  • folds: sum(diff_points_pg) avg(diff_points_pg) min(diff_points_pg) max(diff_points_pg) count(diff_points_pg) distinct(diff_points_pg) only(diff_points_pg) latest(diff_points_pg) top(diff_points_pg) mean(diff_points_pg) median(diff_points_pg) mode(diff_points_pg)
  • ranks: diff_points_pg_percentile
  • accumulates: as_of(diff_points_pg)
  • can be a benchmark
NBA Stats · hoopR
ahead_at_half Ahead H string
dimension

Its record when leading at half-time.

Record when leading at half-time

What it takes
  • folds: count(ahead_at_half) distinct(ahead_at_half) only(ahead_at_half) latest(ahead_at_half) top(ahead_at_half) mode(ahead_at_half)
NBA Stats · hoopR
behind_at_half Behind H string
dimension

Its record when trailing at half-time.

What it takes
  • folds: count(behind_at_half) distinct(behind_at_half) only(behind_at_half) latest(behind_at_half) top(behind_at_half) mode(behind_at_half)
NBA Stats · hoopR
three_pts_or_less ≤3 pts string
dimension

Its record in games decided by three points or fewer.

Record in games decided by three or fewer

What it takes
  • folds: count(three_pts_or_less) distinct(three_pts_or_less) only(three_pts_or_less) latest(three_pts_or_less) top(three_pts_or_less) mode(three_pts_or_less)
NBA Stats · hoopR
ten_pts_or_more ≥10 pts string
dimension

Its record in games decided by ten or more.

What it takes
  • folds: count(ten_pts_or_more) distinct(ten_pts_or_more) only(ten_pts_or_more) latest(ten_pts_or_more) top(ten_pts_or_more) mode(ten_pts_or_more)
NBA Stats · hoopR
vs_east vs East string
dimension

Its record against the Eastern Conference.

What it takes
  • folds: count(vs_east) distinct(vs_east) only(vs_east) latest(vs_east) top(vs_east) mode(vs_east)
NBA Stats · hoopR
vs_west vs West string
dimension

Its record against the Western Conference.

What it takes
  • folds: count(vs_west) distinct(vs_west) only(vs_west) latest(vs_west) top(vs_west) mode(vs_west)
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · hoopR
Operators on this table 38 available, 5 not

from

The one table a query reads

from nba.standings
select team, conference, wins, losses, win_pct, playoff_rank, streak, diff_points_pg
order by win_pct desc
limit 40

select

The columns the answer carries

from nba.standings
select team, conference, wins, losses, win_pct, playoff_rank, streak, diff_points_pg
order by win_pct desc
limit 40

as

Renames a column's heading and nothing else

from nba.standings
select team, conference, wins as W
order by wins desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.standings
where season = $year
select team, conference, wins
order by wins desc
limit 10

limit

How many rows come back

from nba.standings
select team, conference, wins, losses, win_pct, playoff_rank, streak, diff_points_pg
order by win_pct desc
limit 40

order by

Which end of the answer comes first

from nba.standings
select team, conference, wins
order by wins desc
limit 10

#

A comment, to the end of the line

# Standings — Where every club finished, with the splits the league keeps beside it.
from nba.standings
select team, conference, wins, losses, win_pct, playoff_rank, streak, diff_points_pg
order by win_pct desc
limit 40

where

Chooses the rows the question is about

from nba.standings
where season = 2026
select team, wins
order by wins desc
limit 10

and

Continues whichever filter clause came last

from nba.standings
where season = 2026 and wins > 0
select team, wins
order by wins desc
limit 10

having

Filters the groups a fold made

from nba.standings
select team, sum(wins)
group by team
having sum(wins) > 0
order by sum(wins) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.standings
where season = 2026
select team, wins, wins_percentile
keep wins_percentile >= 90
order by wins_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.standings
select team, season, wins
highlight season = 2026
order by wins desc
limit 10

of

A threshold that is another row rather than a number

from nba.standings
where wins >= max(wins) of season 2026
select team, wins
order by wins desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.standings
select team, count(*), sum(wins)
group by team
order by sum(wins) desc
limit 10

then

Folds the answer a second time

from nba.standings
select team, conference, count(*)
group by team, conference
having count(*) > 10
then
select team, count(*) as Confs
group by team
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.standings
select team, conference, sum(wins)
group by team, conference
pivot by conference
limit 25

first / last

Only part of each career, before anything else runs

from nba.standings
first 3 seasons
select team, sum(wins)
group by team
order by sum(wins) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.standings
select team, sum(wins)
group by team
order by sum(wins) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.standings
select team, avg(wins)
group by team
order by avg(wins) desc
limit 10

min(…)

The smallest value in each group

from nba.standings
select team, min(wins)
group by team
order by min(wins) desc
limit 10

max(…)

The largest value in each group

from nba.standings
select team, max(wins)
group by team
order by max(wins) desc
limit 10

count(…)

How many rows a group swallowed

from nba.standings
select team, count(wins)
group by team
order by count(wins) desc
limit 10

distinct(…)

How many different values a group holds

from nba.standings
select team, distinct(conference)
group by team
order by distinct(conference) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.standings
where season = 2026
select team, only(conference)
group by team
order by only(conference) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.standings
select team, latest(team)
group by team
order by count(*) desc
limit 10

top(…)

The value on the group's biggest row

from nba.standings
select team, top(team)
group by team
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.standings
select team, mean(wins)
group by team
order by mean(wins) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.standings
select team, median(wins)
group by team
order by median(wins) desc
limit 10

mode(…)

The commonest value in the group

from nba.standings
select team, mode(team)
group by team
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.standings
where season = 2026
select team, wins, wins_percentile
order by wins_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.standings
select team, sum(wins), percentile(sum(wins))
group by team
order by sum(wins) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.standings
where season = 2026
select team, wins, standing(wins)
order by wins desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.standings
where season = 2026
select team, wins, losses, composite(wins, losses)
order by composite(wins, losses) desc
limit 10

ratio(…)

One column divided by another

from nba.standings
select team, count(*), ratio(sum(wins), count(*))
group by team
order by ratio(sum(wins), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.standings
where season = 2026
select team, wins, losses, calc(standing(wins) - standing(losses))
order by calc(standing(wins) - standing(losses)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.standings
select team, wins, format(wins, > 0 -> "on the board", <= 0 -> "nothing yet")
order by wins desc
limit 10

pair

Draws two columns of the answer in one

from nba.standings
where season = 2026
select team, wins, wins_percentile
pair wins with wins_percentile
order by wins desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.standings
where season = 2026
select team, wins, losses, win_pct, composite(wins, losses, win_pct) as Score
hint composite(wins, losses, win_pct) as "W + L + W%"
order by composite(wins, losses, win_pct) desc
limit 10

Not on this table

  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along

nba.tracking Tracking

What the cameras measured, per player per season — drives, touches, passes, contested rebounds, speed and distance.

from nba.tracking
select player, team, games, drives, drive_pts, touches, pts_per_touch, dist_miles
order by drives desc
limit 100
One row is
one player's season (player-season)
Built from
one table, read straight
Reads
nba_player_tracking NBA Stats, hoopR
Shows by default
player team games drives drive_pts touches pts_per_touch dist_miles
Ordered by
drives desc
Rows
100 by default, 5000 at most
Ranks within
season
Careers counted in
seasons
Biggest row
touches

Applied unless you say otherwise

  • Limited to the regular season — add where season_type = Playoffs to change it.

Before you trust the numbers

  • The tracking cameras went league-wide in 2013-14, so every column but catch-and-shoot and pull-up shooting is null before then.
  • The league only publishes a player once he is past its own minimum for the measure, so a low-minute season is absent rather than zero.
Dimensions 5
NameBound to
league always nba
team the team column
player the player column
position the position column
season the season column
Columns 47
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) top(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
season_type completes season_type Type string
dimension

Whether the game was a regular-season, play-in or playoff game.

Regular Season, Playoffs or PlayIn

What it takes
  • folds: count(season_type) distinct(season_type) only(season_type) latest(season_type) top(season_type) mode(season_type)
NBA Stats · hoopR
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) top(player) mode(player)
NBA Stats · hoopR
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) top(team) mode(team)
NBA Stats · hoopR
position completes position Pos string
dimension

The position he started at.

What it takes
  • folds: count(position) distinct(position) only(position) latest(position) top(position) mode(position)
NBA Stats · hoopR
games GP integer
measure

Games he played in. NBA.com

What it takes
  • folds: sum(games) avg(games) min(games) max(games) count(games) distinct(games) only(games) latest(games) top(games) mean(games) median(games) mode(games)
  • ranks: games_percentile
  • accumulates: as_of(games)
  • can be a benchmark
NBA Stats · hoopR
minutes MIN number
measure

Minutes he was on the floor. NBA.com

What it takes
  • folds: sum(minutes) avg(minutes) min(minutes) max(minutes) count(minutes) distinct(minutes) only(minutes) latest(minutes) top(minutes) mean(minutes) median(minutes) mode(minutes)
  • ranks: minutes_percentile
  • accumulates: as_of(minutes)
  • can be a benchmark
NBA Stats · hoopR
catch_shoot_fga C&S FGA integer
measure

Shots taken without dribbling, at least ten feet out.

What it takes
  • folds: sum(catch_shoot_fga) avg(catch_shoot_fga) min(catch_shoot_fga) max(catch_shoot_fga) count(catch_shoot_fga) distinct(catch_shoot_fga) only(catch_shoot_fga) latest(catch_shoot_fga) top(catch_shoot_fga) mean(catch_shoot_fga) median(catch_shoot_fga) mode(catch_shoot_fga)
  • ranks: catch_shoot_fga_percentile
  • accumulates: as_of(catch_shoot_fga)
  • can be a benchmark
NBA Stats · hoopR
catch_shoot_pts C&S Pts integer
measure

Points scored catching and shooting.

What it takes
  • folds: sum(catch_shoot_pts) avg(catch_shoot_pts) min(catch_shoot_pts) max(catch_shoot_pts) count(catch_shoot_pts) distinct(catch_shoot_pts) only(catch_shoot_pts) latest(catch_shoot_pts) top(catch_shoot_pts) mean(catch_shoot_pts) median(catch_shoot_pts) mode(catch_shoot_pts)
  • ranks: catch_shoot_pts_percentile
  • accumulates: as_of(catch_shoot_pts)
  • can be a benchmark
NBA Stats · hoopR
catch_shoot_efg C&S eFG% number
measure

Effective field-goal percentage catching and shooting.

What it takes
  • folds: sum(catch_shoot_efg) avg(catch_shoot_efg) min(catch_shoot_efg) max(catch_shoot_efg) count(catch_shoot_efg) distinct(catch_shoot_efg) only(catch_shoot_efg) latest(catch_shoot_efg) top(catch_shoot_efg) mean(catch_shoot_efg) median(catch_shoot_efg) mode(catch_shoot_efg)
  • ranks: catch_shoot_efg_percentile
  • accumulates: as_of(catch_shoot_efg)
  • can be a benchmark
NBA Stats · hoopR
pull_up_fga Pull FGA integer
measure

Shots taken off the dribble, at least ten feet out.

What it takes
  • folds: sum(pull_up_fga) avg(pull_up_fga) min(pull_up_fga) max(pull_up_fga) count(pull_up_fga) distinct(pull_up_fga) only(pull_up_fga) latest(pull_up_fga) top(pull_up_fga) mean(pull_up_fga) median(pull_up_fga) mode(pull_up_fga)
  • ranks: pull_up_fga_percentile
  • accumulates: as_of(pull_up_fga)
  • can be a benchmark
NBA Stats · hoopR
pull_up_pts Pull Pts integer
measure

Points scored pulling up.

What it takes
  • folds: sum(pull_up_pts) avg(pull_up_pts) min(pull_up_pts) max(pull_up_pts) count(pull_up_pts) distinct(pull_up_pts) only(pull_up_pts) latest(pull_up_pts) top(pull_up_pts) mean(pull_up_pts) median(pull_up_pts) mode(pull_up_pts)
  • ranks: pull_up_pts_percentile
  • accumulates: as_of(pull_up_pts)
  • can be a benchmark
NBA Stats · hoopR
pull_up_efg Pull eFG% number
measure

Effective field-goal percentage pulling up.

What it takes
  • folds: sum(pull_up_efg) avg(pull_up_efg) min(pull_up_efg) max(pull_up_efg) count(pull_up_efg) distinct(pull_up_efg) only(pull_up_efg) latest(pull_up_efg) top(pull_up_efg) mean(pull_up_efg) median(pull_up_efg) mode(pull_up_efg)
  • ranks: pull_up_efg_percentile
  • accumulates: as_of(pull_up_efg)
  • can be a benchmark
NBA Stats · hoopR
drives Drives integer
measure

Drives — a touch that started at least twenty feet out and ended within ten.

Drives starts in 2013

What it takes
  • folds: sum(drives) avg(drives) min(drives) max(drives) count(drives) distinct(drives) only(drives) latest(drives) top(drives) mean(drives) median(drives) mode(drives)
  • ranks: drives_percentile
  • accumulates: as_of(drives)
  • can be a benchmark
NBA Stats · hoopR
drive_pts Drive Pts integer
measure

Points he scored on drives.

Drive Pts starts in 2013

What it takes
  • folds: sum(drive_pts) avg(drive_pts) min(drive_pts) max(drive_pts) count(drive_pts) distinct(drive_pts) only(drive_pts) latest(drive_pts) top(drive_pts) mean(drive_pts) median(drive_pts) mode(drive_pts)
  • ranks: drive_pts_percentile
  • accumulates: as_of(drive_pts)
  • can be a benchmark
NBA Stats · hoopR
drive_fg_pct Drive FG% number
measure

His shooting percentage on drives.

Drive FG% starts in 2013

What it takes
  • folds: sum(drive_fg_pct) avg(drive_fg_pct) min(drive_fg_pct) max(drive_fg_pct) count(drive_fg_pct) distinct(drive_fg_pct) only(drive_fg_pct) latest(drive_fg_pct) top(drive_fg_pct) mean(drive_fg_pct) median(drive_fg_pct) mode(drive_fg_pct)
  • ranks: drive_fg_pct_percentile
  • accumulates: as_of(drive_fg_pct)
  • can be a benchmark
NBA Stats · hoopR
drive_ast Drive Ast integer
measure

Assists he made out of a drive.

Drive Ast starts in 2013

What it takes
  • folds: sum(drive_ast) avg(drive_ast) min(drive_ast) max(drive_ast) count(drive_ast) distinct(drive_ast) only(drive_ast) latest(drive_ast) top(drive_ast) mean(drive_ast) median(drive_ast) mode(drive_ast)
  • ranks: drive_ast_percentile
  • accumulates: as_of(drive_ast)
  • can be a benchmark
NBA Stats · hoopR
touches Touches integer
measure

Times he touched the ball.

Touches starts in 2013

What it takes
  • folds: sum(touches) avg(touches) min(touches) max(touches) count(touches) distinct(touches) only(touches) latest(touches) top(touches) mean(touches) median(touches) mode(touches)
  • ranks: touches_percentile
  • accumulates: as_of(touches)
  • can be a benchmark
NBA Stats · hoopR
front_ct_touches FC Touches integer
measure

Touches in the front court.

Touches in the front court

FC Touches starts in 2013

What it takes
  • folds: sum(front_ct_touches) avg(front_ct_touches) min(front_ct_touches) max(front_ct_touches) count(front_ct_touches) distinct(front_ct_touches) only(front_ct_touches) latest(front_ct_touches) top(front_ct_touches) mean(front_ct_touches) median(front_ct_touches) mode(front_ct_touches)
  • ranks: front_ct_touches_percentile
  • accumulates: as_of(front_ct_touches)
  • can be a benchmark
NBA Stats · hoopR
time_of_poss Time number
measure

Minutes he spent holding the ball.

Minutes of possession

Time starts in 2013

What it takes
  • folds: sum(time_of_poss) avg(time_of_poss) min(time_of_poss) max(time_of_poss) count(time_of_poss) distinct(time_of_poss) only(time_of_poss) latest(time_of_poss) top(time_of_poss) mean(time_of_poss) median(time_of_poss) mode(time_of_poss)
  • ranks: time_of_poss_percentile
  • accumulates: as_of(time_of_poss)
  • can be a benchmark
NBA Stats · hoopR
avg_sec_per_touch Sec/Touch number
measure

Seconds he held the ball on an average touch.

Sec/Touch starts in 2013

What it takes
  • folds: sum(avg_sec_per_touch) avg(avg_sec_per_touch) min(avg_sec_per_touch) max(avg_sec_per_touch) count(avg_sec_per_touch) distinct(avg_sec_per_touch) only(avg_sec_per_touch) latest(avg_sec_per_touch) top(avg_sec_per_touch) mean(avg_sec_per_touch) median(avg_sec_per_touch) mode(avg_sec_per_touch)
  • ranks: avg_sec_per_touch_percentile
  • accumulates: as_of(avg_sec_per_touch)
  • can be a benchmark
NBA Stats · hoopR
pts_per_touch Pts/Touch number
measure

Points his club scored per touch he took.

Pts/Touch starts in 2013

What it takes
  • folds: sum(pts_per_touch) avg(pts_per_touch) min(pts_per_touch) max(pts_per_touch) count(pts_per_touch) distinct(pts_per_touch) only(pts_per_touch) latest(pts_per_touch) top(pts_per_touch) mean(pts_per_touch) median(pts_per_touch) mode(pts_per_touch)
  • ranks: pts_per_touch_percentile
  • can be a benchmark
NBA Stats · hoopR
paint_touches Paint integer
measure

Touches in the paint with his back to or facing the basket.

Paint starts in 2013

What it takes
  • folds: sum(paint_touches) avg(paint_touches) min(paint_touches) max(paint_touches) count(paint_touches) distinct(paint_touches) only(paint_touches) latest(paint_touches) top(paint_touches) mean(paint_touches) median(paint_touches) mode(paint_touches)
  • ranks: paint_touches_percentile
  • accumulates: as_of(paint_touches)
  • can be a benchmark
NBA Stats · hoopR
post_touches Post integer
measure

Touches with his back to the basket outside the paint.

Post starts in 2013

What it takes
  • folds: sum(post_touches) avg(post_touches) min(post_touches) max(post_touches) count(post_touches) distinct(post_touches) only(post_touches) latest(post_touches) top(post_touches) mean(post_touches) median(post_touches) mode(post_touches)
  • ranks: post_touches_percentile
  • accumulates: as_of(post_touches)
  • can be a benchmark
NBA Stats · hoopR
elbow_touches Elbow integer
measure

Touches at the elbow.

Elbow starts in 2013

What it takes
  • folds: sum(elbow_touches) avg(elbow_touches) min(elbow_touches) max(elbow_touches) count(elbow_touches) distinct(elbow_touches) only(elbow_touches) latest(elbow_touches) top(elbow_touches) mean(elbow_touches) median(elbow_touches) mode(elbow_touches)
  • ranks: elbow_touches_percentile
  • accumulates: as_of(elbow_touches)
  • can be a benchmark
NBA Stats · hoopR
pts_per_paint_touch Pts/Paint number
measure

Points his club scored per paint touch of his.

Pts/Paint starts in 2013

What it takes
  • folds: sum(pts_per_paint_touch) avg(pts_per_paint_touch) min(pts_per_paint_touch) max(pts_per_paint_touch) count(pts_per_paint_touch) distinct(pts_per_paint_touch) only(pts_per_paint_touch) latest(pts_per_paint_touch) top(pts_per_paint_touch) mean(pts_per_paint_touch) median(pts_per_paint_touch) mode(pts_per_paint_touch)
  • ranks: pts_per_paint_touch_percentile
  • can be a benchmark
NBA Stats · hoopR
pts_per_post_touch Pts/Post number
measure

Points his club scored per post touch of his.

Pts/Post starts in 2013

What it takes
  • folds: sum(pts_per_post_touch) avg(pts_per_post_touch) min(pts_per_post_touch) max(pts_per_post_touch) count(pts_per_post_touch) distinct(pts_per_post_touch) only(pts_per_post_touch) latest(pts_per_post_touch) top(pts_per_post_touch) mean(pts_per_post_touch) median(pts_per_post_touch) mode(pts_per_post_touch)
  • ranks: pts_per_post_touch_percentile
  • can be a benchmark
NBA Stats · hoopR
passes_made Passes integer
measure

Passes he threw.

Passes starts in 2013

What it takes
  • folds: sum(passes_made) avg(passes_made) min(passes_made) max(passes_made) count(passes_made) distinct(passes_made) only(passes_made) latest(passes_made) top(passes_made) mean(passes_made) median(passes_made) mode(passes_made)
  • ranks: passes_made_percentile
  • accumulates: as_of(passes_made)
  • can be a benchmark
NBA Stats · hoopR
potential_ast Pot Ast integer
measure

Passes that would have been assists had the shot gone in.

Passes that would have been assists had the shot gone in

Pot Ast starts in 2013

What it takes
  • folds: sum(potential_ast) avg(potential_ast) min(potential_ast) max(potential_ast) count(potential_ast) distinct(potential_ast) only(potential_ast) latest(potential_ast) top(potential_ast) mean(potential_ast) median(potential_ast) mode(potential_ast)
  • ranks: potential_ast_percentile
  • accumulates: as_of(potential_ast)
  • can be a benchmark
NBA Stats · hoopR
secondary_ast 2nd Ast integer
measure

The pass before the assist — the hockey assist.

The pass before the assist

2nd Ast starts in 2013

What it takes
  • folds: sum(secondary_ast) avg(secondary_ast) min(secondary_ast) max(secondary_ast) count(secondary_ast) distinct(secondary_ast) only(secondary_ast) latest(secondary_ast) top(secondary_ast) mean(secondary_ast) median(secondary_ast) mode(secondary_ast)
  • ranks: secondary_ast_percentile
  • accumulates: as_of(secondary_ast)
  • can be a benchmark
NBA Stats · hoopR
ast_pts_created Ast Pts integer
measure

Points his assists produced.

Ast Pts starts in 2013

What it takes
  • folds: sum(ast_pts_created) avg(ast_pts_created) min(ast_pts_created) max(ast_pts_created) count(ast_pts_created) distinct(ast_pts_created) only(ast_pts_created) latest(ast_pts_created) top(ast_pts_created) mean(ast_pts_created) median(ast_pts_created) mode(ast_pts_created)
  • ranks: ast_pts_created_percentile
  • accumulates: as_of(ast_pts_created)
  • can be a benchmark
NBA Stats · hoopR
ast_to_pass_pct Ast/Pass number
measure

Share of his passes that became assists.

Ast/Pass starts in 2013

What it takes
  • folds: sum(ast_to_pass_pct) avg(ast_to_pass_pct) min(ast_to_pass_pct) max(ast_to_pass_pct) count(ast_to_pass_pct) distinct(ast_to_pass_pct) only(ast_to_pass_pct) latest(ast_to_pass_pct) top(ast_to_pass_pct) mean(ast_to_pass_pct) median(ast_to_pass_pct) mode(ast_to_pass_pct)
  • ranks: ast_to_pass_pct_percentile
  • can be a benchmark
NBA Stats · hoopR
reb_chances Reb Chances integer
measure

Rebounds that came within three and a half feet of him.

Rebounds within his reach

Reb Chances starts in 2013

What it takes
  • folds: sum(reb_chances) avg(reb_chances) min(reb_chances) max(reb_chances) count(reb_chances) distinct(reb_chances) only(reb_chances) latest(reb_chances) top(reb_chances) mean(reb_chances) median(reb_chances) mode(reb_chances)
  • ranks: reb_chances_percentile
  • accumulates: as_of(reb_chances)
  • can be a benchmark
NBA Stats · hoopR
reb_chance_pct Reb Conv% number
measure

Share of the rebounds within reach that he took.

Share of the rebounds within reach he took

Reb Conv% starts in 2013

What it takes
  • folds: sum(reb_chance_pct) avg(reb_chance_pct) min(reb_chance_pct) max(reb_chance_pct) count(reb_chance_pct) distinct(reb_chance_pct) only(reb_chance_pct) latest(reb_chance_pct) top(reb_chance_pct) mean(reb_chance_pct) median(reb_chance_pct) mode(reb_chance_pct)
  • ranks: reb_chance_pct_percentile
  • can be a benchmark
NBA Stats · hoopR
reb_contest Cont Reb integer
measure

Rebounds he took with an opponent within three and a half feet.

Rebounds taken with an opponent within a metre

Cont Reb starts in 2013

What it takes
  • folds: sum(reb_contest) avg(reb_contest) min(reb_contest) max(reb_contest) count(reb_contest) distinct(reb_contest) only(reb_contest) latest(reb_contest) top(reb_contest) mean(reb_contest) median(reb_contest) mode(reb_contest)
  • ranks: reb_contest_percentile
  • accumulates: as_of(reb_contest)
  • can be a benchmark
NBA Stats · hoopR
reb_contest_pct Cont% number
measure

Share of his rebounds that were contested.

Cont% starts in 2013

What it takes
  • folds: sum(reb_contest_pct) avg(reb_contest_pct) min(reb_contest_pct) max(reb_contest_pct) count(reb_contest_pct) distinct(reb_contest_pct) only(reb_contest_pct) latest(reb_contest_pct) top(reb_contest_pct) mean(reb_contest_pct) median(reb_contest_pct) mode(reb_contest_pct)
  • ranks: reb_contest_pct_percentile
  • can be a benchmark
NBA Stats · hoopR
avg_reb_dist Reb Dist number
measure

Average feet from the basket he rebounded from.

Average feet from the basket he rebounded from

Reb Dist starts in 2013

What it takes
  • folds: sum(avg_reb_dist) avg(avg_reb_dist) min(avg_reb_dist) max(avg_reb_dist) count(avg_reb_dist) distinct(avg_reb_dist) only(avg_reb_dist) latest(avg_reb_dist) top(avg_reb_dist) mean(avg_reb_dist) median(avg_reb_dist) mode(avg_reb_dist)
  • ranks: avg_reb_dist_percentile
  • accumulates: as_of(avg_reb_dist)
  • can be a benchmark
NBA Stats · hoopR
dist_miles Miles number
measure

Miles he travelled on the floor.

Miles travelled

Miles starts in 2013

What it takes
  • folds: sum(dist_miles) avg(dist_miles) min(dist_miles) max(dist_miles) count(dist_miles) distinct(dist_miles) only(dist_miles) latest(dist_miles) top(dist_miles) mean(dist_miles) median(dist_miles) mode(dist_miles)
  • ranks: dist_miles_percentile
  • accumulates: as_of(dist_miles)
  • can be a benchmark
NBA Stats · hoopR
dist_miles_off Mi Off number
measure

Miles travelled on offence.

Mi Off starts in 2013

What it takes
  • folds: sum(dist_miles_off) avg(dist_miles_off) min(dist_miles_off) max(dist_miles_off) count(dist_miles_off) distinct(dist_miles_off) only(dist_miles_off) latest(dist_miles_off) top(dist_miles_off) mean(dist_miles_off) median(dist_miles_off) mode(dist_miles_off)
  • ranks: dist_miles_off_percentile
  • accumulates: as_of(dist_miles_off)
  • can be a benchmark
NBA Stats · hoopR
dist_miles_def Mi Def number
measure

Miles travelled on defence.

Mi Def starts in 2013

What it takes
  • folds: sum(dist_miles_def) avg(dist_miles_def) min(dist_miles_def) max(dist_miles_def) count(dist_miles_def) distinct(dist_miles_def) only(dist_miles_def) latest(dist_miles_def) top(dist_miles_def) mean(dist_miles_def) median(dist_miles_def) mode(dist_miles_def)
  • ranks: dist_miles_def_percentile
  • accumulates: as_of(dist_miles_def)
  • can be a benchmark
NBA Stats · hoopR
avg_speed Speed number
measure

His average speed in miles per hour.

Average miles per hour

Speed starts in 2013

What it takes
  • folds: sum(avg_speed) avg(avg_speed) min(avg_speed) max(avg_speed) count(avg_speed) distinct(avg_speed) only(avg_speed) latest(avg_speed) top(avg_speed) mean(avg_speed) median(avg_speed) mode(avg_speed)
  • ranks: avg_speed_percentile
  • accumulates: as_of(avg_speed)
  • can be a benchmark
NBA Stats · hoopR
avg_speed_off Speed Off number
measure

Average speed on offence.

Speed Off starts in 2013

What it takes
  • folds: sum(avg_speed_off) avg(avg_speed_off) min(avg_speed_off) max(avg_speed_off) count(avg_speed_off) distinct(avg_speed_off) only(avg_speed_off) latest(avg_speed_off) top(avg_speed_off) mean(avg_speed_off) median(avg_speed_off) mode(avg_speed_off)
  • ranks: avg_speed_off_percentile
  • accumulates: as_of(avg_speed_off)
  • can be a benchmark
NBA Stats · hoopR
avg_speed_def Speed Def number
measure

Average speed on defence.

Speed Def starts in 2013

What it takes
  • folds: sum(avg_speed_def) avg(avg_speed_def) min(avg_speed_def) max(avg_speed_def) count(avg_speed_def) distinct(avg_speed_def) only(avg_speed_def) latest(avg_speed_def) top(avg_speed_def) mean(avg_speed_def) median(avg_speed_def) mode(avg_speed_def)
  • ranks: avg_speed_def_percentile
  • accumulates: as_of(avg_speed_def)
  • can be a benchmark
NBA Stats · hoopR
def_rim_fga Rim FGA integer
measure

Shots at the rim he was the closest defender on.

Shots at the rim he defended

Rim FGA starts in 2013

What it takes
  • folds: sum(def_rim_fga) avg(def_rim_fga) min(def_rim_fga) max(def_rim_fga) count(def_rim_fga) distinct(def_rim_fga) only(def_rim_fga) latest(def_rim_fga) top(def_rim_fga) mean(def_rim_fga) median(def_rim_fga) mode(def_rim_fga)
  • ranks: def_rim_fga_percentile
  • accumulates: as_of(def_rim_fga)
  • can be a benchmark
NBA Stats · hoopR
def_rim_fg_pct lower is better Rim FG% number
measure

What those shooters made against him.

Rim FG% starts in 2013

What it takes
  • folds: sum(def_rim_fg_pct) avg(def_rim_fg_pct) min(def_rim_fg_pct) max(def_rim_fg_pct) count(def_rim_fg_pct) distinct(def_rim_fg_pct) only(def_rim_fg_pct) latest(def_rim_fg_pct) top(def_rim_fg_pct) mean(def_rim_fg_pct) median(def_rim_fg_pct) mode(def_rim_fg_pct)
  • ranks: def_rim_fg_pct_percentile
  • accumulates: as_of(def_rim_fg_pct)
  • can be a benchmark
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · hoopR
Operators on this table 38 available, 5 not

from

The one table a query reads

from nba.tracking
select player, team, games, drives, drive_pts, touches, pts_per_touch, dist_miles
order by drives desc
limit 100

select

The columns the answer carries

from nba.tracking
select player, team, games, drives, drive_pts, touches, pts_per_touch, dist_miles
order by drives desc
limit 100

as

Renames a column's heading and nothing else

from nba.tracking
select player, team, games as GP
order by games desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.tracking
where season = $year
select player, team, games
order by games desc
limit 10

limit

How many rows come back

from nba.tracking
select player, team, games, drives, drive_pts, touches, pts_per_touch, dist_miles
order by drives desc
limit 100

order by

Which end of the answer comes first

from nba.tracking
select player, team, games
order by games desc
limit 10

#

A comment, to the end of the line

# Tracking — What the cameras measured, per player per season — drives, touches, passes, contested rebounds, speed and distance.
from nba.tracking
select player, team, games, drives, drive_pts, touches, pts_per_touch, dist_miles
order by drives desc
limit 100

where

Chooses the rows the question is about

from nba.tracking
where season = 2026
select player, games
order by games desc
limit 10

and

Continues whichever filter clause came last

from nba.tracking
where season = 2026 and games > 0
select player, games
order by games desc
limit 10

having

Filters the groups a fold made

from nba.tracking
select player, sum(games)
group by player
having sum(games) > 0
order by sum(games) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.tracking
where season = 2026
select player, games, games_percentile
keep games_percentile >= 90
order by games_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.tracking
select player, season, games
highlight season = 2026
order by games desc
limit 10

of

A threshold that is another row rather than a number

from nba.tracking
where games >= max(games) of position PG
select player, games
order by games desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.tracking
select player, count(*), sum(games)
group by player
order by sum(games) desc
limit 10

then

Folds the answer a second time

from nba.tracking
select player, team, count(*)
group by player, team
having count(*) > 10
then
select player, count(*) as Teams
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.tracking
select player, team, sum(games)
group by player, team
pivot by team
limit 25

first / last

Only part of each career, before anything else runs

from nba.tracking
first 3 seasons
select player, sum(games)
group by player
order by sum(games) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.tracking
select player, sum(games)
group by player
order by sum(games) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.tracking
select player, avg(games)
group by player
order by avg(games) desc
limit 10

min(…)

The smallest value in each group

from nba.tracking
select player, min(games)
group by player
order by min(games) desc
limit 10

max(…)

The largest value in each group

from nba.tracking
select player, max(games)
group by player
order by max(games) desc
limit 10

count(…)

How many rows a group swallowed

from nba.tracking
select player, count(games)
group by player
order by count(games) desc
limit 10

distinct(…)

How many different values a group holds

from nba.tracking
select player, distinct(team)
group by player
order by distinct(team) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.tracking
where season = 2026
select player, only(team)
group by player
order by only(team) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.tracking
select player, latest(player)
group by player
order by count(*) desc
limit 10

top(…)

The value on the group's biggest row

from nba.tracking
select player, top(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.tracking
select player, mean(games)
group by player
order by mean(games) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.tracking
select player, median(games)
group by player
order by median(games) desc
limit 10

mode(…)

The commonest value in the group

from nba.tracking
select player, mode(player)
group by player
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.tracking
where season = 2026
select player, games, games_percentile
order by games_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.tracking
select player, sum(games), percentile(sum(games))
group by player
order by sum(games) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.tracking
where season = 2026
select player, games, standing(games)
order by games desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.tracking
where season = 2026
select player, games, minutes, composite(games, minutes)
order by composite(games, minutes) desc
limit 10

ratio(…)

One column divided by another

from nba.tracking
select player, count(*), ratio(sum(games), count(*))
group by player
order by ratio(sum(games), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.tracking
where season = 2026
select player, games, minutes, calc(standing(games) - standing(minutes))
order by calc(standing(games) - standing(minutes)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.tracking
select player, games, format(games, > 0 -> "on the board", <= 0 -> "nothing yet")
order by games desc
limit 10

pair

Draws two columns of the answer in one

from nba.tracking
where season = 2026
select player, games, games_percentile
pair games with games_percentile
order by games desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.tracking
where season = 2026
select player, games, minutes, catch_shoot_fga, composite(games, minutes, catch_shoot_fga) as Score
hint composite(games, minutes, catch_shoot_fga) as "GP + MIN + C&S FGA"
order by composite(games, minutes, catch_shoot_fga) desc
limit 10

Not on this table

  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along

nba.shots Shots

Every shot since 1996-97 with where it was taken from — about 230,000 a season.

from nba.shots
select game_date, player, team, shot_type, distance, made, points
order by distance desc
limit 200
One row is
one player's shot (player-shot)
Built from
one table, read straight
Reads
nba_shots NBA Stats, hoopR
Shows by default
game_date player team shot_type distance made points
Ordered by
distance desc
Rows
200 by default, 50000 at most
Ranks within
season
Careers counted in
seasons game_dates shots
Newest row
game_date
Biggest row
distance

Applied unless you say otherwise

  • Limited to the regular season — add where season_type = Playoffs to change it.

Before you trust the numbers

  • Court coordinates are feet from the basket: x runs sideline to sideline and y out from the baseline, so a corner three is a large |x| and a small y.
  • fg_pct and efg_pct are folds over the rows the query matched — filter to a player, a zone or a distance and they answer for that.
Dimensions 7
NameBound to
league always nba
team the team column
player the player column
position A shot carries no position — query nba.players
season the season column
shot_typethis sport only the shot_type column
periodthis sport only the period column
Columns 22
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) top(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
season_type completes season_type Type string
dimension

Whether the game was a regular-season, play-in or playoff game.

Regular Season, Playoffs or PlayIn

What it takes
  • folds: count(season_type) distinct(season_type) only(season_type) latest(season_type) top(season_type) mode(season_type)
NBA Stats · hoopR
game_date Date date
dimension

The date the game was played.

What it takes
  • folds: min(game_date) max(game_date) count(game_date) distinct(game_date) only(game_date) latest(game_date) top(game_date) mode(game_date)
  • periods: year(game_date) quarter(game_date) month(game_date) week(game_date)
  • can be a benchmark
NBA Stats · hoopR
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) top(player) mode(player)
NBA Stats · hoopR
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) top(team) mode(team)
NBA Stats · hoopR
opponent completes team Opp string
dimension

The other club.

What it takes
  • folds: count(opponent) distinct(opponent) only(opponent) latest(opponent) top(opponent) mode(opponent)
NBA Stats · hoopR
home H/A boolean
dimension

Whether this club was at home.

What it takes
  • folds: count(home) distinct(home) only(home) latest(home) top(home) mode(home)
NBA Stats · hoopR
period Per integer
measure

The quarter, with overtime continuing the count — 5 is the first overtime.

What it takes
  • folds: sum(period) avg(period) min(period) max(period) count(period) distinct(period) only(period) latest(period) top(period) mean(period) median(period) mode(period)
  • ranks: period_percentile
  • accumulates: as_of(period)
  • can be a benchmark
NBA Stats · hoopR
seconds_remaining Sec number
measure

Seconds left in the period when it happened.

Seconds left in the period

What it takes
  • folds: sum(seconds_remaining) avg(seconds_remaining) min(seconds_remaining) max(seconds_remaining) count(seconds_remaining) distinct(seconds_remaining) only(seconds_remaining) latest(seconds_remaining) top(seconds_remaining) mean(seconds_remaining) median(seconds_remaining) mode(seconds_remaining)
  • ranks: seconds_remaining_percentile
  • accumulates: as_of(seconds_remaining)
  • can be a benchmark
NBA Stats · hoopR
shot_type completes shot_type Type string
dimension

How the league described the attempt — Jump Shot, Driving Layup, Step Back Jump Shot.

The league's description of the attempt — Jump Shot, Driving Layup, Step Back Jump Shot

What it takes
  • folds: count(shot_type) distinct(shot_type) only(shot_type) latest(shot_type) top(shot_type) mode(shot_type)
NBA Stats · hoopR
shot_value Pts if made integer
measure

What the shot was worth if it went in: two or three.

2 or 3

What it takes
  • folds: sum(shot_value) avg(shot_value) min(shot_value) max(shot_value) count(shot_value) distinct(shot_value) only(shot_value) latest(shot_value) top(shot_value) mean(shot_value) median(shot_value) mode(shot_value)
  • ranks: shot_value_percentile
  • accumulates: as_of(shot_value)
  • can be a benchmark
NBA Stats · hoopR
distance Dist number
measure

Feet from the basket.

Feet from the basket

What it takes
  • folds: sum(distance) avg(distance) min(distance) max(distance) count(distance) distinct(distance) only(distance) latest(distance) top(distance) mean(distance) median(distance) mode(distance)
  • ranks: distance_percentile
  • accumulates: as_of(distance)
  • can be a benchmark
NBA Stats · hoopR
x X number
measure

Feet across the court from the basket; negative is to the shooter's left looking at it.

Feet across the court from the basket — negative is left of it

What it takes
  • folds: sum(x) avg(x) min(x) max(x) count(x) distinct(x) only(x) latest(x) top(x) mean(x) median(x) mode(x)
  • ranks: x_percentile
  • accumulates: as_of(x)
  • can be a benchmark
NBA Stats · hoopR
y Y number
measure

Feet out from the baseline.

Feet out from the baseline

What it takes
  • folds: sum(y) avg(y) min(y) max(y) count(y) distinct(y) only(y) latest(y) top(y) mean(y) median(y) mode(y)
  • ranks: y_percentile
  • accumulates: as_of(y)
  • can be a benchmark
NBA Stats · hoopR
made Made boolean
dimension

Whether it went in.

What it takes
  • folds: count(made) distinct(made) only(made) latest(made) top(made) mode(made)
NBA Stats · hoopR
points Pts integer
measure

What the attempt was worth — zero if it missed.

What the shot was worth — 0 if it missed

What it takes
  • folds: sum(points) avg(points) min(points) max(points) count(points) distinct(points) only(points) latest(points) top(points) mean(points) median(points) mode(points)
  • ranks: points_percentile
  • accumulates: as_of(points)
  • can be a benchmark
NBA Stats · hoopR
fg_pct FG% number
measure

Share of field goals that went in. NBA.com

Share of these shots that went in

What it takes
  • folds: sum(fg_pct) avg(fg_pct) min(fg_pct) max(fg_pct) count(fg_pct) distinct(fg_pct) only(fg_pct) latest(fg_pct) top(fg_pct) mean(fg_pct) median(fg_pct) mode(fg_pct)
  • ranks: fg_pct_percentile
  • accumulates: as_of(fg_pct)
  • can be a benchmark
NBA Stats · hoopR
efg_pct eFG% number
measure

Effective field goal percentage — shooting percentage with a three counted as a basket and a half, because it is worth that. NBA.com

Shooting percentage with a three counted one and a half times

What it takes
  • folds: sum(efg_pct) avg(efg_pct) min(efg_pct) max(efg_pct) count(efg_pct) distinct(efg_pct) only(efg_pct) latest(efg_pct) top(efg_pct) mean(efg_pct) median(efg_pct) mode(efg_pct)
  • ranks: efg_pct_percentile
  • accumulates: as_of(efg_pct)
  • can be a benchmark
NBA Stats · hoopR
pts_per_shot Pts/Shot number
measure

Points per shot attempt.

What it takes
  • folds: sum(pts_per_shot) avg(pts_per_shot) min(pts_per_shot) max(pts_per_shot) count(pts_per_shot) distinct(pts_per_shot) only(pts_per_shot) latest(pts_per_shot) top(pts_per_shot) mean(pts_per_shot) median(pts_per_shot) mode(pts_per_shot)
  • ranks: pts_per_shot_percentile
  • accumulates: as_of(pts_per_shot)
  • can be a benchmark
NBA Stats · hoopR
description Shot string
dimension

The league's own description of the play.

What it takes
  • folds: count(description) distinct(description) only(description) latest(description) top(description) mode(description)
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · hoopR
Operators on this table 43 available

from

The one table a query reads

from nba.shots
select game_date, player, team, shot_type, distance, made, points
order by distance desc
limit 200

select

The columns the answer carries

from nba.shots
select game_date, player, team, shot_type, distance, made, points
order by distance desc
limit 200

as

Renames a column's heading and nothing else

from nba.shots
select game_date, player, distance as Dist
order by distance desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.shots
where season = $year
select game_date, player, team
order by distance desc
limit 10

limit

How many rows come back

from nba.shots
select game_date, player, team, shot_type, distance, made, points
order by distance desc
limit 200

order by

Which end of the answer comes first

from nba.shots
select game_date, player, team, distance
order by distance desc
limit 10

#

A comment, to the end of the line

# Shots — Every shot since 1996-97 with where it was taken from — about 230,000 a season.
from nba.shots
select game_date, player, team, shot_type, distance, made, points
order by distance desc
limit 200

where

Chooses the rows the question is about

from nba.shots
where season = 2026
select player, distance
order by distance desc
limit 10

and

Continues whichever filter clause came last

from nba.shots
where season = 2026 and distance > 0
select player, distance
order by distance desc
limit 10

having

Filters the groups a fold made

from nba.shots
select player, sum(distance)
group by player
having sum(distance) > 0
order by sum(distance) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.shots
where season = 2026
select player, distance, distance_percentile
keep distance_percentile >= 90
order by distance_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.shots
select player, season, distance
highlight season = 2026
order by distance desc
limit 10

of

A threshold that is another row rather than a number

from nba.shots
where distance >= max(distance) of season 2026
select player, distance
order by distance desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.shots
select player, count(*), sum(distance)
group by player
order by sum(distance) desc
limit 10

then

Folds the answer a second time

from nba.shots
select player, team, count(*)
group by player, team
having count(*) > 10
then
select player, count(*) as Teams
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.shots
select player, team, sum(distance)
group by player, team
pivot by team
limit 25

first / last

Only part of each career, before anything else runs

from nba.shots
first 3 seasons
select player, sum(distance)
group by player
order by sum(distance) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.shots
select player, sum(distance)
group by player
order by sum(distance) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.shots
select player, avg(distance)
group by player
order by avg(distance) desc
limit 10

min(…)

The smallest value in each group

from nba.shots
select player, min(distance)
group by player
order by min(distance) desc
limit 10

max(…)

The largest value in each group

from nba.shots
select player, max(distance)
group by player
order by max(distance) desc
limit 10

count(…)

How many rows a group swallowed

from nba.shots
select player, count(distance)
group by player
order by count(distance) desc
limit 10

distinct(…)

How many different values a group holds

from nba.shots
select player, distinct(game_date)
group by player
order by distinct(game_date) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.shots
where season = 2026
select player, only(game_date)
group by player
order by only(game_date) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.shots
select player, latest(player)
group by player
order by count(*) desc
limit 10

top(…)

The value on the group's biggest row

from nba.shots
select player, top(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.shots
select player, mean(distance)
group by player
order by mean(distance) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.shots
select player, median(distance)
group by player
order by median(distance) desc
limit 10

mode(…)

The commonest value in the group

from nba.shots
select player, mode(player)
group by player
order by count(*) desc
limit 10

year(…)

Reads a date as the year it falls in

from nba.shots
select player, year(game_date), sum(distance)
group by player, year(game_date)
order by year(game_date) asc
limit 20

quarter(…)

Reads a date as the quarter it falls in

from nba.shots
select player, quarter(game_date), sum(distance)
group by player, quarter(game_date)
order by quarter(game_date) asc
limit 20

month(…)

Reads a date as the month it falls in

from nba.shots
select player, month(game_date), sum(distance)
group by player, month(game_date)
order by month(game_date) asc
limit 20

week(…)

Reads a date as the week it falls in

from nba.shots
select player, week(game_date), sum(distance)
group by player, week(game_date)
order by week(game_date) asc
limit 20

as_of(…)

The stat as it stood, season to date

from nba.shots
where season = 2026
select player, month(game_date), as_of(distance)
group by player, month(game_date)
order by month(game_date) asc
limit 25

<stat>_percentile

Where a row sits in its population, 0-100

from nba.shots
where season = 2026
select player, distance, distance_percentile
order by distance_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.shots
select player, sum(distance), percentile(sum(distance))
group by player
order by sum(distance) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.shots
where season = 2026
select player, distance, standing(distance)
order by distance desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.shots
where season = 2026
select player, period, seconds_remaining, composite(period, seconds_remaining)
order by composite(period, seconds_remaining) desc
limit 10

ratio(…)

One column divided by another

from nba.shots
select player, count(*), ratio(sum(distance), count(*))
group by player
order by ratio(sum(distance), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.shots
where season = 2026
select player, period, seconds_remaining, calc(standing(period) - standing(seconds_remaining))
order by calc(standing(period) - standing(seconds_remaining)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.shots
select player, distance, format(distance, > 0 -> "on the board", <= 0 -> "nothing yet")
order by distance desc
limit 10

pair

Draws two columns of the answer in one

from nba.shots
where season = 2026
select player, distance, distance_percentile
pair distance with distance_percentile
order by distance desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.shots
where season = 2026
select player, period, seconds_remaining, shot_value, composite(period, seconds_remaining, shot_value) as Score
hint composite(period, seconds_remaining, shot_value) as "Per + Sec + Pts if made"
order by composite(period, seconds_remaining, shot_value) desc
limit 10

nba.possessions Possessions

Every possession since 1996-97: how it started, what it produced, and the ten players on the floor.

from nba.possessions
select game_date, team, opponent, period, start_type, length_seconds, points
order by points desc
limit 200
One row is
one team's possession (team-possession)
Built from
one table, read straight
Reads
nba_possessions NBA Stats, hoopR
Shows by default
game_date team opponent period start_type length_seconds points
Ordered by
points desc
Rows
200 by default, 50000 at most
Ranks within
season
Careers counted in
seasons game_dates possessions
Newest row
game_date
Biggest row
points

Applied unless you say otherwise

  • Limited to the regular season — add where season_type = Playoffs to change it.

Before you trust the numbers

  • A possession row is about the club with the ball; the same moment is the opponent's defensive possession and is not a second row.
  • counts is false for the possessions a pace or rating denominator leaves out — a heave at the buzzer, an end-of-quarter inbound.
  • The ten player columns are league ids rather than names, which is what makes a lineup question askable: group by off_player_1 is a real grouping.
Dimensions 7
NameBound to
league always nba
team the team column
player A possession has ten players — query nba.shots for the shooter, or nba.players
position A possession carries no position
season the season column
periodthis sport only the period column
start_typethis sport only the start_type column
Columns 32
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) top(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
season_type completes season_type Type string
dimension

Whether the game was a regular-season, play-in or playoff game.

Regular Season, Playoffs or PlayIn

What it takes
  • folds: count(season_type) distinct(season_type) only(season_type) latest(season_type) top(season_type) mode(season_type)
NBA Stats · hoopR
game_date Date date
dimension

The date the game was played.

What it takes
  • folds: min(game_date) max(game_date) count(game_date) distinct(game_date) only(game_date) latest(game_date) top(game_date) mode(game_date)
  • periods: year(game_date) quarter(game_date) month(game_date) week(game_date)
  • can be a benchmark
NBA Stats · hoopR
team completes team Team string
dimension

The club.

The club with the ball

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) top(team) mode(team)
NBA Stats · hoopR
opponent completes team Opp string
dimension

The other club.

What it takes
  • folds: count(opponent) distinct(opponent) only(opponent) latest(opponent) top(opponent) mode(opponent)
NBA Stats · hoopR
period Per integer
measure

The quarter, with overtime continuing the count — 5 is the first overtime.

What it takes
  • folds: sum(period) avg(period) min(period) max(period) count(period) distinct(period) only(period) latest(period) top(period) mean(period) median(period) mode(period)
  • ranks: period_percentile
  • accumulates: as_of(period)
  • can be a benchmark
NBA Stats · hoopR
start_type completes possession_start_type Start string
dimension

How the possession began — off a miss, a make, a turnover or a dead ball.

OffMissedShot, OffMadeShot, OffTurnover, OffDeadball, OffRebound

What it takes
  • folds: count(start_type) distinct(start_type) only(start_type) latest(start_type) top(start_type) mode(start_type)
NBA Stats · hoopR
points Pts integer
measure

What the attempt was worth — zero if it missed.

What it takes
  • folds: sum(points) avg(points) min(points) max(points) count(points) distinct(points) only(points) latest(points) top(points) mean(points) median(points) mode(points)
  • ranks: points_percentile
  • accumulates: as_of(points)
  • can be a benchmark
NBA Stats · hoopR
counts Counts boolean
dimension

Whether it counts against a pace or rating denominator. A heave at the buzzer does not.

Whether it counts against a pace or rating denominator

What it takes
  • folds: count(counts) distinct(counts) only(counts) latest(counts) top(counts) mode(counts)
NBA Stats · hoopR
second_chance 2nd boolean
dimension

Whether it followed an offensive rebound.

What it takes
  • folds: count(second_chance) distinct(second_chance) only(second_chance) latest(second_chance) top(second_chance) mode(second_chance)
NBA Stats · hoopR
length_seconds Length number
measure

Seconds the possession lasted.

Seconds the possession lasted

What it takes
  • folds: sum(length_seconds) avg(length_seconds) min(length_seconds) max(length_seconds) count(length_seconds) distinct(length_seconds) only(length_seconds) latest(length_seconds) top(length_seconds) mean(length_seconds) median(length_seconds) mode(length_seconds)
  • ranks: length_seconds_percentile
  • accumulates: as_of(length_seconds)
  • can be a benchmark
NBA Stats · hoopR
fg2m 2PM integer
measure

Two-pointers made on the possession.

What it takes
  • folds: sum(fg2m) avg(fg2m) min(fg2m) max(fg2m) count(fg2m) distinct(fg2m) only(fg2m) latest(fg2m) top(fg2m) mean(fg2m) median(fg2m) mode(fg2m)
  • ranks: fg2m_percentile
  • accumulates: as_of(fg2m)
  • can be a benchmark
NBA Stats · hoopR
fg2a 2PA integer
measure

Two-pointers attempted on the possession.

What it takes
  • folds: sum(fg2a) avg(fg2a) min(fg2a) max(fg2a) count(fg2a) distinct(fg2a) only(fg2a) latest(fg2a) top(fg2a) mean(fg2a) median(fg2a) mode(fg2a)
  • ranks: fg2a_percentile
  • accumulates: as_of(fg2a)
  • can be a benchmark
NBA Stats · hoopR
fg3m 3PM integer
measure

Three-pointers made. NBA.com

What it takes
  • folds: sum(fg3m) avg(fg3m) min(fg3m) max(fg3m) count(fg3m) distinct(fg3m) only(fg3m) latest(fg3m) top(fg3m) mean(fg3m) median(fg3m) mode(fg3m)
  • ranks: fg3m_percentile
  • accumulates: as_of(fg3m)
  • can be a benchmark
NBA Stats · hoopR
fg3a 3PA integer
measure

Three-pointers attempted. NBA.com

What it takes
  • folds: sum(fg3a) avg(fg3a) min(fg3a) max(fg3a) count(fg3a) distinct(fg3a) only(fg3a) latest(fg3a) top(fg3a) mean(fg3a) median(fg3a) mode(fg3a)
  • ranks: fg3a_percentile
  • accumulates: as_of(fg3a)
  • can be a benchmark
NBA Stats · hoopR
ftm FTM integer
measure

Free throws made. NBA.com

What it takes
  • folds: sum(ftm) avg(ftm) min(ftm) max(ftm) count(ftm) distinct(ftm) only(ftm) latest(ftm) top(ftm) mean(ftm) median(ftm) mode(ftm)
  • ranks: ftm_percentile
  • accumulates: as_of(ftm)
  • can be a benchmark
NBA Stats · hoopR
fta FTA integer
measure

Free throws attempted. NBA.com

What it takes
  • folds: sum(fta) avg(fta) min(fta) max(fta) count(fta) distinct(fta) only(fta) latest(fta) top(fta) mean(fta) median(fta) mode(fta)
  • ranks: fta_percentile
  • accumulates: as_of(fta)
  • can be a benchmark
NBA Stats · hoopR
oreb OREB integer
measure

Rebounds of the shooting team's own misses. NBA.com

What it takes
  • folds: sum(oreb) avg(oreb) min(oreb) max(oreb) count(oreb) distinct(oreb) only(oreb) latest(oreb) top(oreb) mean(oreb) median(oreb) mode(oreb)
  • ranks: oreb_percentile
  • accumulates: as_of(oreb)
  • can be a benchmark
NBA Stats · hoopR
turnovers lower is better TOV integer
measure

Times he lost the ball.

What it takes
  • folds: sum(turnovers) avg(turnovers) min(turnovers) max(turnovers) count(turnovers) distinct(turnovers) only(turnovers) latest(turnovers) top(turnovers) mean(turnovers) median(turnovers) mode(turnovers)
  • ranks: turnovers_percentile
  • accumulates: as_of(turnovers)
  • can be a benchmark
NBA Stats · hoopR
points_per_100 Pts/100 number
measure

Points per hundred possessions.

Points per hundred possessions — the whole reason to count possessions

What it takes
  • folds: sum(points_per_100) avg(points_per_100) min(points_per_100) max(points_per_100) count(points_per_100) distinct(points_per_100) only(points_per_100) latest(points_per_100) top(points_per_100) mean(points_per_100) median(points_per_100) mode(points_per_100)
  • ranks: points_per_100_percentile
  • accumulates: as_of(points_per_100)
  • can be a benchmark
NBA Stats · hoopR
off_player_1 Off 1 integer
measure

A player on the floor for the offence, by his league id.

The league id of a player on the floor for the offence

What it takes
  • folds: sum(off_player_1) avg(off_player_1) min(off_player_1) max(off_player_1) count(off_player_1) distinct(off_player_1) only(off_player_1) latest(off_player_1) top(off_player_1) mean(off_player_1) median(off_player_1) mode(off_player_1)
  • ranks: off_player_1_percentile
  • accumulates: as_of(off_player_1)
  • can be a benchmark
NBA Stats · hoopR
off_player_2 Off 2 integer
measure

A player on the floor for the offence, by his league id.

What it takes
  • folds: sum(off_player_2) avg(off_player_2) min(off_player_2) max(off_player_2) count(off_player_2) distinct(off_player_2) only(off_player_2) latest(off_player_2) top(off_player_2) mean(off_player_2) median(off_player_2) mode(off_player_2)
  • ranks: off_player_2_percentile
  • accumulates: as_of(off_player_2)
  • can be a benchmark
NBA Stats · hoopR
off_player_3 Off 3 integer
measure

A player on the floor for the offence, by his league id.

What it takes
  • folds: sum(off_player_3) avg(off_player_3) min(off_player_3) max(off_player_3) count(off_player_3) distinct(off_player_3) only(off_player_3) latest(off_player_3) top(off_player_3) mean(off_player_3) median(off_player_3) mode(off_player_3)
  • ranks: off_player_3_percentile
  • accumulates: as_of(off_player_3)
  • can be a benchmark
NBA Stats · hoopR
off_player_4 Off 4 integer
measure

A player on the floor for the offence, by his league id.

What it takes
  • folds: sum(off_player_4) avg(off_player_4) min(off_player_4) max(off_player_4) count(off_player_4) distinct(off_player_4) only(off_player_4) latest(off_player_4) top(off_player_4) mean(off_player_4) median(off_player_4) mode(off_player_4)
  • ranks: off_player_4_percentile
  • accumulates: as_of(off_player_4)
  • can be a benchmark
NBA Stats · hoopR
off_player_5 Off 5 integer
measure

A player on the floor for the offence, by his league id.

What it takes
  • folds: sum(off_player_5) avg(off_player_5) min(off_player_5) max(off_player_5) count(off_player_5) distinct(off_player_5) only(off_player_5) latest(off_player_5) top(off_player_5) mean(off_player_5) median(off_player_5) mode(off_player_5)
  • ranks: off_player_5_percentile
  • accumulates: as_of(off_player_5)
  • can be a benchmark
NBA Stats · hoopR
def_player_1 Def 1 integer
measure

A player on the floor for the defence, by his league id.

What it takes
  • folds: sum(def_player_1) avg(def_player_1) min(def_player_1) max(def_player_1) count(def_player_1) distinct(def_player_1) only(def_player_1) latest(def_player_1) top(def_player_1) mean(def_player_1) median(def_player_1) mode(def_player_1)
  • ranks: def_player_1_percentile
  • accumulates: as_of(def_player_1)
  • can be a benchmark
NBA Stats · hoopR
def_player_2 Def 2 integer
measure

A player on the floor for the defence, by his league id.

What it takes
  • folds: sum(def_player_2) avg(def_player_2) min(def_player_2) max(def_player_2) count(def_player_2) distinct(def_player_2) only(def_player_2) latest(def_player_2) top(def_player_2) mean(def_player_2) median(def_player_2) mode(def_player_2)
  • ranks: def_player_2_percentile
  • accumulates: as_of(def_player_2)
  • can be a benchmark
NBA Stats · hoopR
def_player_3 Def 3 integer
measure

A player on the floor for the defence, by his league id.

What it takes
  • folds: sum(def_player_3) avg(def_player_3) min(def_player_3) max(def_player_3) count(def_player_3) distinct(def_player_3) only(def_player_3) latest(def_player_3) top(def_player_3) mean(def_player_3) median(def_player_3) mode(def_player_3)
  • ranks: def_player_3_percentile
  • accumulates: as_of(def_player_3)
  • can be a benchmark
NBA Stats · hoopR
def_player_4 Def 4 integer
measure

A player on the floor for the defence, by his league id.

What it takes
  • folds: sum(def_player_4) avg(def_player_4) min(def_player_4) max(def_player_4) count(def_player_4) distinct(def_player_4) only(def_player_4) latest(def_player_4) top(def_player_4) mean(def_player_4) median(def_player_4) mode(def_player_4)
  • ranks: def_player_4_percentile
  • accumulates: as_of(def_player_4)
  • can be a benchmark
NBA Stats · hoopR
def_player_5 Def 5 integer
measure

A player on the floor for the defence, by his league id.

What it takes
  • folds: sum(def_player_5) avg(def_player_5) min(def_player_5) max(def_player_5) count(def_player_5) distinct(def_player_5) only(def_player_5) latest(def_player_5) top(def_player_5) mean(def_player_5) median(def_player_5) mode(def_player_5)
  • ranks: def_player_5_percentile
  • accumulates: as_of(def_player_5)
  • can be a benchmark
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · hoopR
Operators on this table 43 available

from

The one table a query reads

from nba.possessions
select game_date, team, opponent, period, start_type, length_seconds, points
order by points desc
limit 200

select

The columns the answer carries

from nba.possessions
select game_date, team, opponent, period, start_type, length_seconds, points
order by points desc
limit 200

as

Renames a column's heading and nothing else

from nba.possessions
select game_date, team, period as Per
order by period desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.possessions
where season = $year
select game_date, team, opponent
order by period desc
limit 10

limit

How many rows come back

from nba.possessions
select game_date, team, opponent, period, start_type, length_seconds, points
order by points desc
limit 200

order by

Which end of the answer comes first

from nba.possessions
select game_date, team, opponent, period
order by period desc
limit 10

#

A comment, to the end of the line

# Possessions — Every possession since 1996-97: how it started, what it produced, and the ten players on the floor.
from nba.possessions
select game_date, team, opponent, period, start_type, length_seconds, points
order by points desc
limit 200

where

Chooses the rows the question is about

from nba.possessions
where season = 2026
select team, period
order by period desc
limit 10

and

Continues whichever filter clause came last

from nba.possessions
where season = 2026 and period > 0
select team, period
order by period desc
limit 10

having

Filters the groups a fold made

from nba.possessions
select team, sum(period)
group by team
having sum(period) > 0
order by sum(period) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.possessions
where season = 2026
select team, period, period_percentile
keep period_percentile >= 90
order by period_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.possessions
select team, season, period
highlight season = 2026
order by period desc
limit 10

of

A threshold that is another row rather than a number

from nba.possessions
where period >= max(period) of season 2026
select team, period
order by period desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.possessions
select team, count(*), sum(period)
group by team
order by sum(period) desc
limit 10

then

Folds the answer a second time

from nba.possessions
select team, opponent, count(*)
group by team, opponent
having count(*) > 10
then
select team, count(*) as Opps
group by team
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.possessions
select team, opponent, sum(period)
group by team, opponent
pivot by opponent
limit 25

first / last

Only part of each career, before anything else runs

from nba.possessions
first 3 seasons
select team, sum(period)
group by team
order by sum(period) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.possessions
select team, sum(period)
group by team
order by sum(period) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.possessions
select team, avg(period)
group by team
order by avg(period) desc
limit 10

min(…)

The smallest value in each group

from nba.possessions
select team, min(period)
group by team
order by min(period) desc
limit 10

max(…)

The largest value in each group

from nba.possessions
select team, max(period)
group by team
order by max(period) desc
limit 10

count(…)

How many rows a group swallowed

from nba.possessions
select team, count(period)
group by team
order by count(period) desc
limit 10

distinct(…)

How many different values a group holds

from nba.possessions
select team, distinct(game_date)
group by team
order by distinct(game_date) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.possessions
where season = 2026
select team, only(game_date)
group by team
order by only(game_date) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.possessions
select team, latest(team)
group by team
order by count(*) desc
limit 10

top(…)

The value on the group's biggest row

from nba.possessions
select team, top(team)
group by team
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.possessions
select team, mean(period)
group by team
order by mean(period) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.possessions
select team, median(period)
group by team
order by median(period) desc
limit 10

mode(…)

The commonest value in the group

from nba.possessions
select team, mode(team)
group by team
order by count(*) desc
limit 10

year(…)

Reads a date as the year it falls in

from nba.possessions
select team, year(game_date), sum(period)
group by team, year(game_date)
order by year(game_date) asc
limit 20

quarter(…)

Reads a date as the quarter it falls in

from nba.possessions
select team, quarter(game_date), sum(period)
group by team, quarter(game_date)
order by quarter(game_date) asc
limit 20

month(…)

Reads a date as the month it falls in

from nba.possessions
select team, month(game_date), sum(period)
group by team, month(game_date)
order by month(game_date) asc
limit 20

week(…)

Reads a date as the week it falls in

from nba.possessions
select team, week(game_date), sum(period)
group by team, week(game_date)
order by week(game_date) asc
limit 20

as_of(…)

The stat as it stood, season to date

from nba.possessions
where season = 2026
select team, month(game_date), as_of(period)
group by team, month(game_date)
order by month(game_date) asc
limit 25

<stat>_percentile

Where a row sits in its population, 0-100

from nba.possessions
where season = 2026
select team, period, period_percentile
order by period_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.possessions
select team, sum(period), percentile(sum(period))
group by team
order by sum(period) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.possessions
where season = 2026
select team, period, standing(period)
order by period desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.possessions
where season = 2026
select team, period, points, composite(period, points)
order by composite(period, points) desc
limit 10

ratio(…)

One column divided by another

from nba.possessions
select team, count(*), ratio(sum(period), count(*))
group by team
order by ratio(sum(period), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.possessions
where season = 2026
select team, period, points, calc(standing(period) - standing(points))
order by calc(standing(period) - standing(points)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.possessions
select team, period, format(period, > 0 -> "on the board", <= 0 -> "nothing yet")
order by period desc
limit 10

pair

Draws two columns of the answer in one

from nba.possessions
where season = 2026
select team, period, period_percentile
pair period with period_percentile
order by period desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.possessions
where season = 2026
select team, period, points, length_seconds, composite(period, points, length_seconds) as Score
hint composite(period, points, length_seconds) as "Per + Pts + Length"
order by composite(period, points, length_seconds) desc
limit 10

nba.draft Draft picks

Every pick since the 1996 draft, with what the pick became.

from nba.draft
select draft_year, overall, player, position, team, organization, career_games, career_pts
order by overall asc
limit 100
One row is
one player's pick (player-pick)
Built from
one table, read straight
Reads
nba_draft NBA Stats, hoopR
Shows by default
draft_year overall player position team organization career_games career_pts
Ordered by
overall asc
Rows
100 by default, 5000 at most
Ranks within
season
Careers counted in
seasons picks
Newest row
draft_year

Before you trust the numbers

  • The career columns count regular-season play only, and only from 1996-97 on — a pick from an early draft has the part of his career this warehouse covers.
  • A pick whose player never appeared has no player id and null career columns; his name is still on the row.
Dimensions 5
NameBound to
league always nba
team the team column
player the player column
position the position column
season the season column
Columns 18
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) mode(season)
  • can be a benchmark
NBA Stats · hoopR
draft_year Year integer
measure

The year of the draft.

What it takes
  • folds: sum(draft_year) avg(draft_year) min(draft_year) max(draft_year) count(draft_year) distinct(draft_year) only(draft_year) latest(draft_year) mean(draft_year) median(draft_year) mode(draft_year)
  • ranks: draft_year_percentile
  • accumulates: as_of(draft_year)
  • can be a benchmark
NBA Stats · hoopR
overall lower is better Pick integer
measure

His overall pick number.

What it takes
  • folds: sum(overall) avg(overall) min(overall) max(overall) count(overall) distinct(overall) only(overall) latest(overall) mean(overall) median(overall) mode(overall)
  • ranks: overall_percentile
  • accumulates: as_of(overall)
  • can be a benchmark
NBA Stats · hoopR
round lower is better Rd integer
measure

The round he was taken in.

What it takes
  • folds: sum(round) avg(round) min(round) max(round) count(round) distinct(round) only(round) latest(round) mean(round) median(round) mode(round)
  • ranks: round_percentile
  • accumulates: as_of(round)
  • can be a benchmark
NBA Stats · hoopR
round_pick lower is better In Rd integer
measure

His slot within that round.

What it takes
  • folds: sum(round_pick) avg(round_pick) min(round_pick) max(round_pick) count(round_pick) distinct(round_pick) only(round_pick) latest(round_pick) mean(round_pick) median(round_pick) mode(round_pick)
  • ranks: round_pick_percentile
  • accumulates: as_of(round_pick)
  • can be a benchmark
NBA Stats · hoopR
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) mode(player)
NBA Stats · hoopR
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) mode(team)
NBA Stats · hoopR
position completes position Pos string
dimension

The position he started at.

What it takes
  • folds: count(position) distinct(position) only(position) latest(position) mode(position)
NBA Stats · hoopR
organization From string
dimension

Where he was drafted from.

What it takes
  • folds: count(organization) distinct(organization) only(organization) latest(organization) mode(organization)
NBA Stats · hoopR
organization_type Type string
dimension

Whether that was a college, a club abroad, or a high school.

College/University, Other Team/Club, High School

What it takes
  • folds: count(organization_type) distinct(organization_type) only(organization_type) latest(organization_type) mode(organization_type)
NBA Stats · hoopR
country completes country Ctry string
dimension

The country he is listed as from.

What it takes
  • folds: count(country) distinct(country) only(country) latest(country) mode(country)
NBA Stats · hoopR
height_inches Ht integer
measure

Height in inches.

What it takes
  • folds: sum(height_inches) avg(height_inches) min(height_inches) max(height_inches) count(height_inches) distinct(height_inches) only(height_inches) latest(height_inches) mean(height_inches) median(height_inches) mode(height_inches)
  • ranks: height_inches_percentile
  • accumulates: as_of(height_inches)
  • can be a benchmark
NBA Stats · hoopR
weight_lb Wt integer
measure

Weight in pounds.

What it takes
  • folds: sum(weight_lb) avg(weight_lb) min(weight_lb) max(weight_lb) count(weight_lb) distinct(weight_lb) only(weight_lb) latest(weight_lb) mean(weight_lb) median(weight_lb) mode(weight_lb)
  • ranks: weight_lb_percentile
  • accumulates: as_of(weight_lb)
  • can be a benchmark
NBA Stats · hoopR
seasons_played Seasons integer
measure

How many NBA seasons he went on to play.

How many NBA seasons he went on to play

What it takes
  • folds: sum(seasons_played) avg(seasons_played) min(seasons_played) max(seasons_played) count(seasons_played) distinct(seasons_played) only(seasons_played) latest(seasons_played) mean(seasons_played) median(seasons_played) mode(seasons_played)
  • ranks: seasons_played_percentile
  • accumulates: as_of(seasons_played)
  • can be a benchmark
NBA Stats · hoopR
career_games Career GP integer
measure

Games he went on to play.

What it takes
  • folds: sum(career_games) avg(career_games) min(career_games) max(career_games) count(career_games) distinct(career_games) only(career_games) latest(career_games) mean(career_games) median(career_games) mode(career_games)
  • ranks: career_games_percentile
  • accumulates: as_of(career_games)
  • can be a benchmark
NBA Stats · hoopR
career_pts Career Pts integer
measure

Points he went on to score.

What it takes
  • folds: sum(career_pts) avg(career_pts) min(career_pts) max(career_pts) count(career_pts) distinct(career_pts) only(career_pts) latest(career_pts) mean(career_pts) median(career_pts) mode(career_pts)
  • ranks: career_pts_percentile
  • accumulates: as_of(career_pts)
  • can be a benchmark
NBA Stats · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · hoopR
Operators on this table 37 available, 6 not

from

The one table a query reads

from nba.draft
select draft_year, overall, player, position, team, organization, career_games, career_pts
order by overall asc
limit 100

select

The columns the answer carries

from nba.draft
select draft_year, overall, player, position, team, organization, career_games, career_pts
order by overall asc
limit 100

as

Renames a column's heading and nothing else

from nba.draft
select draft_year, overall, draft_year as Year
order by draft_year desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.draft
where season = $year
select draft_year, overall, player
order by draft_year desc
limit 10

limit

How many rows come back

from nba.draft
select draft_year, overall, player, position, team, organization, career_games, career_pts
order by overall asc
limit 100

order by

Which end of the answer comes first

from nba.draft
select draft_year, overall, player
order by draft_year desc
limit 10

#

A comment, to the end of the line

# Draft picks — Every pick since the 1996 draft, with what the pick became.
from nba.draft
select draft_year, overall, player, position, team, organization, career_games, career_pts
order by overall asc
limit 100

where

Chooses the rows the question is about

from nba.draft
where season = 2026
select player, draft_year
order by draft_year desc
limit 10

and

Continues whichever filter clause came last

from nba.draft
where season = 2026 and draft_year > 0
select player, draft_year
order by draft_year desc
limit 10

having

Filters the groups a fold made

from nba.draft
select player, sum(draft_year)
group by player
having sum(draft_year) > 0
order by sum(draft_year) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.draft
where season = 2026
select player, draft_year, draft_year_percentile
keep draft_year_percentile >= 90
order by draft_year_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.draft
select player, season, draft_year
highlight season = 2026
order by draft_year desc
limit 10

of

A threshold that is another row rather than a number

from nba.draft
where draft_year >= max(draft_year) of position PG
select player, draft_year
order by draft_year desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.draft
select player, count(*), sum(draft_year)
group by player
order by sum(draft_year) desc
limit 10

then

Folds the answer a second time

from nba.draft
select player, team, count(*)
group by player, team
having count(*) > 10
then
select player, count(*) as Teams
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.draft
select player, team, sum(draft_year)
group by player, team
pivot by team
limit 25

first / last

Only part of each career, before anything else runs

from nba.draft
first 3 seasons
select player, sum(draft_year)
group by player
order by sum(draft_year) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.draft
select player, sum(draft_year)
group by player
order by sum(draft_year) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.draft
select player, avg(draft_year)
group by player
order by avg(draft_year) desc
limit 10

min(…)

The smallest value in each group

from nba.draft
select player, min(draft_year)
group by player
order by min(draft_year) desc
limit 10

max(…)

The largest value in each group

from nba.draft
select player, max(draft_year)
group by player
order by max(draft_year) desc
limit 10

count(…)

How many rows a group swallowed

from nba.draft
select player, count(draft_year)
group by player
order by count(draft_year) desc
limit 10

distinct(…)

How many different values a group holds

from nba.draft
select player, distinct(team)
group by player
order by distinct(team) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.draft
where season = 2026
select player, only(team)
group by player
order by only(team) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.draft
select player, latest(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.draft
select player, mean(draft_year)
group by player
order by mean(draft_year) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.draft
select player, median(draft_year)
group by player
order by median(draft_year) desc
limit 10

mode(…)

The commonest value in the group

from nba.draft
select player, mode(player)
group by player
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.draft
where season = 2026
select player, draft_year, draft_year_percentile
order by draft_year_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.draft
select player, sum(draft_year), percentile(sum(draft_year))
group by player
order by sum(draft_year) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.draft
where season = 2026
select player, draft_year, standing(draft_year)
order by draft_year desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.draft
where season = 2026
select player, draft_year, overall, composite(draft_year, overall)
order by composite(draft_year, overall) desc
limit 10

ratio(…)

One column divided by another

from nba.draft
select player, count(*), ratio(sum(draft_year), count(*))
group by player
order by ratio(sum(draft_year), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.draft
where season = 2026
select player, draft_year, overall, calc(standing(draft_year) - standing(overall))
order by calc(standing(draft_year) - standing(overall)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.draft
select player, draft_year, format(draft_year, > 0 -> "on the board", <= 0 -> "nothing yet")
order by draft_year desc
limit 10

pair

Draws two columns of the answer in one

from nba.draft
where season = 2026
select player, draft_year, draft_year_percentile
pair draft_year with draft_year_percentile
order by draft_year desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.draft
where season = 2026
select player, draft_year, overall, round, composite(draft_year, overall, round) as Score
hint composite(draft_year, overall, round) as "Year + Pick + Rd"
order by composite(draft_year, overall, round) desc
limit 10

Not on this table

  • top(…) — this table does not say which of its rows is the biggest, so there is no top one to pick
  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along

nba.payroll Payroll

One row per player per season with cap context already worked out — share of the cap, share of the team's payroll, and where he sits on his own roster.

from nba.payroll
select player, team, season, cap_hit, pct_of_cap, roster_rank
order by cap_hit desc
limit 200
One row is
one player's season (player-season)
Built from
a handler — joins or windows a plain select cannot reach
Reads
nba_player_contract_seasons Spotrac
nba_team_season_cap Spotrac
nba_league_season_cap Spotrac
Shows by default
player team season cap_hit pct_of_cap roster_rank
Ordered by
cap_hit desc
Rows
200 by default, 3000 at most
Ranks within
season
Careers counted in
seasons

Before you trust the numbers

  • Dead money is included and flagged; add where dead_money = false for players actually on the roster.
  • Percentages are recomputed against the league cap for that season, not copied from the scrape.
Dimensions 5
NameBound to
league always nba
team the team column
player the player column
position The payroll source carries no position — query nba.players for that
season the season column
Columns 16
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) mode(season)
  • can be a benchmark
Spotrac
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) mode(player)
Spotrac
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) mode(team)
Spotrac
contract_type Type string
dimension

How the contract came about — a rookie scale, a max, a minimum, an extension.

What it takes
  • folds: count(contract_type) distinct(contract_type) only(contract_type) latest(contract_type) mode(contract_type)
Spotrac
dead_money Dead boolean
dimension

Whether the charge is for a player no longer on the roster.

What it takes
  • folds: count(dead_money) distinct(dead_money) only(dead_money) latest(dead_money) mode(dead_money)
Spotrac
cap_hit Cap hit integer
measure

What he counted against the salary cap.

Dollars against the cap this season

What it takes
  • folds: sum(cap_hit) avg(cap_hit) min(cap_hit) max(cap_hit) count(cap_hit) distinct(cap_hit) only(cap_hit) latest(cap_hit) mean(cap_hit) median(cap_hit) mode(cap_hit)
  • ranks: cap_hit_percentile
  • accumulates: as_of(cap_hit)
  • can be a benchmark
Spotrac
base_salary Base integer
measure

The salary itself, before bonuses and cap mechanics.

What it takes
  • folds: sum(base_salary) avg(base_salary) min(base_salary) max(base_salary) count(base_salary) distinct(base_salary) only(base_salary) latest(base_salary) mean(base_salary) median(base_salary) mode(base_salary)
  • ranks: base_salary_percentile
  • accumulates: as_of(base_salary)
  • can be a benchmark
Spotrac
pct_of_cap % of cap number
measure

His cap hit as a share of the league cap — a salary with the era divided out.

What it takes
  • folds: sum(pct_of_cap) avg(pct_of_cap) min(pct_of_cap) max(pct_of_cap) count(pct_of_cap) distinct(pct_of_cap) only(pct_of_cap) latest(pct_of_cap) mean(pct_of_cap) median(pct_of_cap) mode(pct_of_cap)
  • ranks: pct_of_cap_percentile
  • accumulates: as_of(pct_of_cap)
  • can be a benchmark
Spotrac · topspin
pct_of_payroll % of payroll number
measure

His cap hit as a share of what his club was paying in total, dead money included.

What it takes
  • folds: sum(pct_of_payroll) avg(pct_of_payroll) min(pct_of_payroll) max(pct_of_payroll) count(pct_of_payroll) distinct(pct_of_payroll) only(pct_of_payroll) latest(pct_of_payroll) mean(pct_of_payroll) median(pct_of_payroll) mode(pct_of_payroll)
  • ranks: pct_of_payroll_percentile
  • accumulates: as_of(pct_of_payroll)
  • can be a benchmark
Spotrac
pct_of_active_payroll % of active number
measure

His cap hit as a share of what his club was paying the players still on its roster, dead money excluded.

What it takes
  • folds: sum(pct_of_active_payroll) avg(pct_of_active_payroll) min(pct_of_active_payroll) max(pct_of_active_payroll) count(pct_of_active_payroll) distinct(pct_of_active_payroll) only(pct_of_active_payroll) latest(pct_of_active_payroll) mean(pct_of_active_payroll) median(pct_of_active_payroll) mode(pct_of_active_payroll)
  • ranks: pct_of_active_payroll_percentile
  • accumulates: as_of(pct_of_active_payroll)
  • can be a benchmark
Spotrac · topspin
roster_rank Roster # integer
measure

Where his cap hit sat on his own roster, 1 being the highest paid.

Ranked over his club's whole roster, not just the rows this query returned

What it takes
  • folds: sum(roster_rank) avg(roster_rank) min(roster_rank) max(roster_rank) count(roster_rank) distinct(roster_rank) only(roster_rank) latest(roster_rank) mean(roster_rank) median(roster_rank) mode(roster_rank)
  • ranks: roster_rank_percentile
  • accumulates: as_of(roster_rank)
  • can be a benchmark
Spotrac · topspin
team_payroll Team payroll integer
measure

Everything the club was paying that season.

What it takes
  • folds: sum(team_payroll) avg(team_payroll) min(team_payroll) max(team_payroll) count(team_payroll) distinct(team_payroll) only(team_payroll) latest(team_payroll) mean(team_payroll) median(team_payroll) mode(team_payroll)
  • ranks: team_payroll_percentile
  • accumulates: as_of(team_payroll)
  • can be a benchmark
Spotrac
active_payroll Active payroll integer
measure

What the club was paying players still on the roster.

What the club is paying its current roster, dead money excluded

What it takes
  • folds: sum(active_payroll) avg(active_payroll) min(active_payroll) max(active_payroll) count(active_payroll) distinct(active_payroll) only(active_payroll) latest(active_payroll) mean(active_payroll) median(active_payroll) mode(active_payroll)
  • ranks: active_payroll_percentile
  • accumulates: as_of(active_payroll)
  • can be a benchmark
Spotrac
salary_cap Cap integer
measure

The league salary cap that season — the number every share below divides by.

What it takes
  • folds: sum(salary_cap) avg(salary_cap) min(salary_cap) max(salary_cap) count(salary_cap) distinct(salary_cap) only(salary_cap) latest(salary_cap) mean(salary_cap) median(salary_cap) mode(salary_cap)
  • ranks: salary_cap_percentile
  • accumulates: as_of(salary_cap)
  • can be a benchmark
Spotrac
first_apron 1st apron integer
measure

The first apron that season, the spending line that costs a club its exceptions.

What it takes
  • folds: sum(first_apron) avg(first_apron) min(first_apron) max(first_apron) count(first_apron) distinct(first_apron) only(first_apron) latest(first_apron) mean(first_apron) median(first_apron) mode(first_apron)
  • ranks: first_apron_percentile
  • accumulates: as_of(first_apron)
  • can be a benchmark
Spotrac
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

Spotrac
Operators on this table 37 available, 6 not

from

The one table a query reads

from nba.payroll
select player, team, season, cap_hit, pct_of_cap, roster_rank
order by cap_hit desc
limit 200

select

The columns the answer carries

from nba.payroll
select player, team, season, cap_hit, pct_of_cap, roster_rank
order by cap_hit desc
limit 200

as

Renames a column's heading and nothing else

from nba.payroll
select player, team, cap_hit as Cap hit
order by cap_hit desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.payroll
where season = $year
select player, team, season
order by cap_hit desc
limit 10

limit

How many rows come back

from nba.payroll
select player, team, season, cap_hit, pct_of_cap, roster_rank
order by cap_hit desc
limit 200

order by

Which end of the answer comes first

from nba.payroll
select player, team, season, cap_hit
order by cap_hit desc
limit 10

#

A comment, to the end of the line

# Payroll — One row per player per season with cap context already worked out — share of the cap, share of the team's payroll, and where he sits on his own roster.
from nba.payroll
select player, team, season, cap_hit, pct_of_cap, roster_rank
order by cap_hit desc
limit 200

where

Chooses the rows the question is about

from nba.payroll
where season = 2026
select player, cap_hit
order by cap_hit desc
limit 10

and

Continues whichever filter clause came last

from nba.payroll
where season = 2026 and cap_hit > 0
select player, cap_hit
order by cap_hit desc
limit 10

having

Filters the groups a fold made

from nba.payroll
select player, sum(cap_hit)
group by player
having sum(cap_hit) > 0
order by sum(cap_hit) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.payroll
where season = 2026
select player, cap_hit, cap_hit_percentile
keep cap_hit_percentile >= 90
order by cap_hit_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.payroll
select player, season, cap_hit
highlight season = 2026
order by cap_hit desc
limit 10

of

A threshold that is another row rather than a number

from nba.payroll
where cap_hit >= max(cap_hit) of season 2026
select player, cap_hit
order by cap_hit desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.payroll
select player, count(*), sum(cap_hit)
group by player
order by sum(cap_hit) desc
limit 10

then

Folds the answer a second time

from nba.payroll
select player, season, count(*)
group by player, season
having count(*) > 10
then
select player, count(*) as Seasons
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.payroll
select player, season, sum(cap_hit)
group by player, season
pivot by season
limit 25

first / last

Only part of each career, before anything else runs

from nba.payroll
first 3 seasons
select player, sum(cap_hit)
group by player
order by sum(cap_hit) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.payroll
select player, sum(cap_hit)
group by player
order by sum(cap_hit) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.payroll
select player, avg(cap_hit)
group by player
order by avg(cap_hit) desc
limit 10

min(…)

The smallest value in each group

from nba.payroll
select player, min(cap_hit)
group by player
order by min(cap_hit) desc
limit 10

max(…)

The largest value in each group

from nba.payroll
select player, max(cap_hit)
group by player
order by max(cap_hit) desc
limit 10

count(…)

How many rows a group swallowed

from nba.payroll
select player, count(cap_hit)
group by player
order by count(cap_hit) desc
limit 10

distinct(…)

How many different values a group holds

from nba.payroll
select player, distinct(season)
group by player
order by distinct(season) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.payroll
where season = 2026
select player, only(season)
group by player
order by only(season) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.payroll
select player, latest(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.payroll
select player, mean(cap_hit)
group by player
order by mean(cap_hit) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.payroll
select player, median(cap_hit)
group by player
order by median(cap_hit) desc
limit 10

mode(…)

The commonest value in the group

from nba.payroll
select player, mode(player)
group by player
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.payroll
where season = 2026
select player, cap_hit, cap_hit_percentile
order by cap_hit_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.payroll
select player, sum(cap_hit), percentile(sum(cap_hit))
group by player
order by sum(cap_hit) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.payroll
where season = 2026
select player, cap_hit, standing(cap_hit)
order by cap_hit desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.payroll
where season = 2026
select player, cap_hit, base_salary, composite(cap_hit, base_salary)
order by composite(cap_hit, base_salary) desc
limit 10

ratio(…)

One column divided by another

from nba.payroll
select player, count(*), ratio(sum(cap_hit), count(*))
group by player
order by ratio(sum(cap_hit), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.payroll
where season = 2026
select player, cap_hit, base_salary, calc(standing(cap_hit) - standing(base_salary))
order by calc(standing(cap_hit) - standing(base_salary)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.payroll
select player, cap_hit, format(cap_hit, > 0 -> "on the board", <= 0 -> "nothing yet")
order by cap_hit desc
limit 10

pair

Draws two columns of the answer in one

from nba.payroll
where season = 2026
select player, cap_hit, cap_hit_percentile
pair cap_hit with cap_hit_percentile
order by cap_hit desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.payroll
where season = 2026
select player, cap_hit, base_salary, pct_of_cap, composite(cap_hit, base_salary, pct_of_cap) as Score
hint composite(cap_hit, base_salary, pct_of_cap) as "Cap hit + Base + % of cap"
order by composite(cap_hit, base_salary, pct_of_cap) desc
limit 10

Not on this table

  • top(…) — this table does not say which of its rows is the biggest, so there is no top one to pick
  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along

nba.player_seasons Player seasons

One row per player per season: regular-season rates, playoff rates, and cap context, joined.

from nba.player_seasons
select player, team, games, mpg, pts_pg, ts_pct, pie
order by pie desc
limit 200
One row is
one player's season (player-season)
Built from
several tables, each rolled up to shared keys and joined
Reads
nba_player_games NBA Stats, hoopR
nba_player_games NBA Stats, hoopR
nba_player_contract_seasons Spotrac
nba_team_season_cap Spotrac
nba_league_season_cap Spotrac
Shows by default
player team games mpg pts_pg ts_pct pie
Ordered by
pie desc
Rows
200 by default, 3000 at most
Ranks within
season
Careers counted in
seasons

Before you trust the numbers

  • Regular-season columns are the regular season only; the playoff columns are the same box scores read again.
  • Playoff and payroll columns are left-joined — a null means no playoff games, or no contract matched by name.
Dimensions 5
NameBound to
league always nba
team the team column
player the player column
position Neither source carries a position at this grain — query nba.player_games for that
season the season column
Columns 35
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) mode(season)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) mode(player)
NBA Stats · Spotrac · hoopR
team completes team Team string
dimension

The club.

The Team of most of the games in each group

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) mode(team)
NBA Stats · Spotrac · hoopR
last_team completes team Last team string
dimension

The club he was with most recently.

Team from the most recent game in each group that has one

What it takes
  • folds: count(last_team) distinct(last_team) only(last_team) latest(last_team) mode(last_team)
NBA Stats · Spotrac · hoopR
games GP integer
measure

Games he played in. NBA.com

Regular-season games he played in

What it takes
  • folds: sum(games) avg(games) min(games) max(games) count(games) distinct(games) only(games) latest(games) mean(games) median(games) mode(games)
  • ranks: games_percentile
  • accumulates: as_of(games)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
mpg MPG number
measure

Minutes per game. NBA.com

The mean of the game MIN values in each group, each weighted the same

What it takes
  • folds: sum(mpg) avg(mpg) min(mpg) max(mpg) count(mpg) distinct(mpg) only(mpg) latest(mpg) mean(mpg) median(mpg) mode(mpg)
  • ranks: mpg_percentile
  • accumulates: as_of(mpg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
pts_pg PPG number
measure

Points per game. NBA.com

The mean of the game PTS values in each group, each weighted the same

What it takes
  • folds: sum(pts_pg) avg(pts_pg) min(pts_pg) max(pts_pg) count(pts_pg) distinct(pts_pg) only(pts_pg) latest(pts_pg) mean(pts_pg) median(pts_pg) mode(pts_pg)
  • ranks: pts_pg_percentile
  • accumulates: as_of(pts_pg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
reb_pg RPG number
measure

Rebounds per game. NBA.com

The mean of the game REB values in each group, each weighted the same

What it takes
  • folds: sum(reb_pg) avg(reb_pg) min(reb_pg) max(reb_pg) count(reb_pg) distinct(reb_pg) only(reb_pg) latest(reb_pg) mean(reb_pg) median(reb_pg) mode(reb_pg)
  • ranks: reb_pg_percentile
  • accumulates: as_of(reb_pg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
ast_pg APG number
measure

Assists per game. NBA.com

The mean of the game AST values in each group, each weighted the same

What it takes
  • folds: sum(ast_pg) avg(ast_pg) min(ast_pg) max(ast_pg) count(ast_pg) distinct(ast_pg) only(ast_pg) latest(ast_pg) mean(ast_pg) median(ast_pg) mode(ast_pg)
  • ranks: ast_pg_percentile
  • accumulates: as_of(ast_pg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
stl_pg SPG number
measure

Steals per game. NBA.com

The mean of the game STL values in each group, each weighted the same

What it takes
  • folds: sum(stl_pg) avg(stl_pg) min(stl_pg) max(stl_pg) count(stl_pg) distinct(stl_pg) only(stl_pg) latest(stl_pg) mean(stl_pg) median(stl_pg) mode(stl_pg)
  • ranks: stl_pg_percentile
  • accumulates: as_of(stl_pg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
blk_pg BPG number
measure

Blocks per game. NBA.com

The mean of the game BLK values in each group, each weighted the same

What it takes
  • folds: sum(blk_pg) avg(blk_pg) min(blk_pg) max(blk_pg) count(blk_pg) distinct(blk_pg) only(blk_pg) latest(blk_pg) mean(blk_pg) median(blk_pg) mode(blk_pg)
  • ranks: blk_pg_percentile
  • accumulates: as_of(blk_pg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
tov_pg lower is better TOV number
measure

Turnovers per game. NBA.com

The mean of the game TOV values in each group, each weighted the same

What it takes
  • folds: sum(tov_pg) avg(tov_pg) min(tov_pg) max(tov_pg) count(tov_pg) distinct(tov_pg) only(tov_pg) latest(tov_pg) mean(tov_pg) median(tov_pg) mode(tov_pg)
  • ranks: tov_pg_percentile
  • accumulates: as_of(tov_pg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
fg3_pct 3P% number
measure

Share of three-pointers that went in. NBA.com

3P% across the games in each group, as total threes made over total attempts

What it takes
  • folds: sum(fg3_pct) avg(fg3_pct) min(fg3_pct) max(fg3_pct) count(fg3_pct) distinct(fg3_pct) only(fg3_pct) latest(fg3_pct) mean(fg3_pct) median(fg3_pct) mode(fg3_pct)
  • ranks: fg3_pct_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
efg_pct eFG% number
measure

Effective field goal percentage — shooting percentage with a three counted as a basket and a half, because it is worth that. NBA.com

eFG% across the games in each group, as total field goals made with threes counted one and a half, over total attempts

What it takes
  • folds: sum(efg_pct) avg(efg_pct) min(efg_pct) max(efg_pct) count(efg_pct) distinct(efg_pct) only(efg_pct) latest(efg_pct) mean(efg_pct) median(efg_pct) mode(efg_pct)
  • ranks: efg_pct_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
ts_pct TS% number
measure

True shooting percentage — points per scoring possession, counting twos, threes and free throws together. The single fairest measure of how efficiently a player scores. NBA.com

TS% across the games in each group, as total points over total scoring possessions

What it takes
  • folds: sum(ts_pct) avg(ts_pct) min(ts_pct) max(ts_pct) count(ts_pct) distinct(ts_pct) only(ts_pct) latest(ts_pct) mean(ts_pct) median(ts_pct) mode(ts_pct)
  • ranks: ts_pct_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
usg_pct USG% number
measure

Usage rate — the share of the club's possessions finished while on the floor, by shooting, drawing a foul or turning it over. NBA.com

USG% across the games in each group, as weighted by minutes played

What it takes
  • folds: sum(usg_pct) avg(usg_pct) min(usg_pct) max(usg_pct) count(usg_pct) distinct(usg_pct) only(usg_pct) latest(usg_pct) mean(usg_pct) median(usg_pct) mode(usg_pct)
  • ranks: usg_pct_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
reb_pct REB% number
measure

Share of the available rebounds taken while on the floor. NBA.com

REB% across the games in each group, as weighted by minutes played

What it takes
  • folds: sum(reb_pct) avg(reb_pct) min(reb_pct) max(reb_pct) count(reb_pct) distinct(reb_pct) only(reb_pct) latest(reb_pct) mean(reb_pct) median(reb_pct) mode(reb_pct)
  • ranks: reb_pct_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
ast_pct AST% number
measure

Share of the baskets assisted while on the floor. NBA.com

AST% across the games in each group, as weighted by minutes played

What it takes
  • folds: sum(ast_pct) avg(ast_pct) min(ast_pct) max(ast_pct) count(ast_pct) distinct(ast_pct) only(ast_pct) latest(ast_pct) mean(ast_pct) median(ast_pct) mode(ast_pct)
  • ranks: ast_pct_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
off_rating ORtg number
measure

Points scored per 100 possessions while on the floor. NBA.com

ORtg across the games in each group, as weighted by minutes played

What it takes
  • folds: sum(off_rating) avg(off_rating) min(off_rating) max(off_rating) count(off_rating) distinct(off_rating) only(off_rating) latest(off_rating) mean(off_rating) median(off_rating) mode(off_rating)
  • ranks: off_rating_percentile
  • accumulates: as_of(off_rating)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
def_rating lower is better DRtg number
measure

Points allowed per 100 possessions while on the floor. NBA.com

DRtg across the games in each group, as weighted by minutes played

What it takes
  • folds: sum(def_rating) avg(def_rating) min(def_rating) max(def_rating) count(def_rating) distinct(def_rating) only(def_rating) latest(def_rating) mean(def_rating) median(def_rating) mode(def_rating)
  • ranks: def_rating_percentile
  • accumulates: as_of(def_rating)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
net_rating NetRtg number
measure

Offensive rating less defensive rating. NBA.com

NetRtg across the games in each group, as weighted by minutes played

What it takes
  • folds: sum(net_rating) avg(net_rating) min(net_rating) max(net_rating) count(net_rating) distinct(net_rating) only(net_rating) latest(net_rating) mean(net_rating) median(net_rating) mode(net_rating)
  • ranks: net_rating_percentile
  • accumulates: as_of(net_rating)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
pie PIE number
measure

Player impact estimate — a share of everything statistical that happened in the game, as one percentage. NBA.com

PIE across the games in each group, as weighted by minutes played

What it takes
  • folds: sum(pie) avg(pie) min(pie) max(pie) count(pie) distinct(pie) only(pie) latest(pie) mean(pie) median(pie) mode(pie)
  • ranks: pie_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
pie_even PIE (even) number
measure

Player impact estimate, with every game counted the same rather than weighted by minutes. NBA.com

The mean of the game PIE values in each group, each weighted the same — not weighted by minutes played

Every game counts the same — a short appearance weighs as much as a start

What it takes
  • folds: sum(pie_even) avg(pie_even) min(pie_even) max(pie_even) count(pie_even) distinct(pie_even) only(pie_even) latest(pie_even) mean(pie_even) median(pie_even) mode(pie_even)
  • ranks: pie_even_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
playoff_games PO GP integer
measure

Playoff games he played in. NBA.com

Playoff games he played in — null if his team did not qualify

What it takes
  • folds: sum(playoff_games) avg(playoff_games) min(playoff_games) max(playoff_games) count(playoff_games) distinct(playoff_games) only(playoff_games) latest(playoff_games) mean(playoff_games) median(playoff_games) mode(playoff_games)
  • ranks: playoff_games_percentile
  • accumulates: as_of(playoff_games)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
playoff_mpg PO MPG number
measure

Minutes per playoff game. NBA.com

The mean of the game MIN values in each group, each weighted the same

What it takes
  • folds: sum(playoff_mpg) avg(playoff_mpg) min(playoff_mpg) max(playoff_mpg) count(playoff_mpg) distinct(playoff_mpg) only(playoff_mpg) latest(playoff_mpg) mean(playoff_mpg) median(playoff_mpg) mode(playoff_mpg)
  • ranks: playoff_mpg_percentile
  • accumulates: as_of(playoff_mpg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
playoff_pts_pg PO PPG number
measure

Points per playoff game. NBA.com

The mean of the game PTS values in each group, each weighted the same

What it takes
  • folds: sum(playoff_pts_pg) avg(playoff_pts_pg) min(playoff_pts_pg) max(playoff_pts_pg) count(playoff_pts_pg) distinct(playoff_pts_pg) only(playoff_pts_pg) latest(playoff_pts_pg) mean(playoff_pts_pg) median(playoff_pts_pg) mode(playoff_pts_pg)
  • ranks: playoff_pts_pg_percentile
  • accumulates: as_of(playoff_pts_pg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
playoff_ts_pct PO TS% number
measure

True shooting percentage in the playoffs — points per scoring possession, twos, threes and free throws together. NBA.com

TS% across the games in each group, as total points over total scoring possessions

What it takes
  • folds: sum(playoff_ts_pct) avg(playoff_ts_pct) min(playoff_ts_pct) max(playoff_ts_pct) count(playoff_ts_pct) distinct(playoff_ts_pct) only(playoff_ts_pct) latest(playoff_ts_pct) mean(playoff_ts_pct) median(playoff_ts_pct) mode(playoff_ts_pct)
  • ranks: playoff_ts_pct_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
playoff_pie PO PIE number
measure

Player impact estimate in the playoffs. NBA.com

PIE across the games in each group, as weighted by minutes played

What it takes
  • folds: sum(playoff_pie) avg(playoff_pie) min(playoff_pie) max(playoff_pie) count(playoff_pie) distinct(playoff_pie) only(playoff_pie) latest(playoff_pie) mean(playoff_pie) median(playoff_pie) mode(playoff_pie)
  • ranks: playoff_pie_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
cap_hit Cap hit integer
measure

What he counted against the salary cap.

What he counted against the cap this season, across every club that paid him

What it takes
  • folds: sum(cap_hit) avg(cap_hit) min(cap_hit) max(cap_hit) count(cap_hit) distinct(cap_hit) only(cap_hit) latest(cap_hit) mean(cap_hit) median(cap_hit) mode(cap_hit)
  • ranks: cap_hit_percentile
  • accumulates: as_of(cap_hit)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
pct_of_cap % of cap number
measure

His cap hit as a share of the league cap — a salary with the era divided out.

The highest season % of cap in each group

His largest single-club share, in a season he spent at more than one

What it takes
  • folds: sum(pct_of_cap) avg(pct_of_cap) min(pct_of_cap) max(pct_of_cap) count(pct_of_cap) distinct(pct_of_cap) only(pct_of_cap) latest(pct_of_cap) mean(pct_of_cap) median(pct_of_cap) mode(pct_of_cap)
  • ranks: pct_of_cap_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR · topspin
pct_of_payroll % of payroll number
measure

His cap hit as a share of what his club was paying in total, dead money included.

The highest season % of payroll in each group

His largest single-club share, in a season he spent at more than one

What it takes
  • folds: sum(pct_of_payroll) avg(pct_of_payroll) min(pct_of_payroll) max(pct_of_payroll) count(pct_of_payroll) distinct(pct_of_payroll) only(pct_of_payroll) latest(pct_of_payroll) mean(pct_of_payroll) median(pct_of_payroll) mode(pct_of_payroll)
  • ranks: pct_of_payroll_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
pct_of_active_payroll % of active number
measure

His cap hit as a share of what his club was paying the players still on its roster, dead money excluded.

The highest season % of active in each group

His largest single-club share, in a season he spent at more than one

What it takes
  • folds: sum(pct_of_active_payroll) avg(pct_of_active_payroll) min(pct_of_active_payroll) max(pct_of_active_payroll) count(pct_of_active_payroll) distinct(pct_of_active_payroll) only(pct_of_active_payroll) latest(pct_of_active_payroll) mean(pct_of_active_payroll) median(pct_of_active_payroll) mode(pct_of_active_payroll)
  • ranks: pct_of_active_payroll_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR · topspin
roster_rank Roster # integer
measure

Where his cap hit sat on his own roster, 1 being the highest paid.

The lowest season Roster # in each group

Ranked over his club's whole roster, not just the rows this query returned

What it takes
  • folds: sum(roster_rank) avg(roster_rank) min(roster_rank) max(roster_rank) count(roster_rank) distinct(roster_rank) only(roster_rank) latest(roster_rank) mean(roster_rank) median(roster_rank) mode(roster_rank)
  • ranks: roster_rank_percentile
  • accumulates: as_of(roster_rank)
  • can be a benchmark
NBA Stats · Spotrac · hoopR · topspin
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · Spotrac · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · Spotrac · hoopR
Operators on this table 37 available, 6 not

from

The one table a query reads

from nba.player_seasons
select player, team, games, mpg, pts_pg, ts_pct, pie
order by pie desc
limit 200

select

The columns the answer carries

from nba.player_seasons
select player, team, games, mpg, pts_pg, ts_pct, pie
order by pie desc
limit 200

as

Renames a column's heading and nothing else

from nba.player_seasons
select player, team, games as GP
order by games desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.player_seasons
where season = $year
select player, team, games
order by games desc
limit 10

limit

How many rows come back

from nba.player_seasons
select player, team, games, mpg, pts_pg, ts_pct, pie
order by pie desc
limit 200

order by

Which end of the answer comes first

from nba.player_seasons
select player, team, games
order by games desc
limit 10

#

A comment, to the end of the line

# Player seasons — One row per player per season: regular-season rates, playoff rates, and cap context, joined.
from nba.player_seasons
select player, team, games, mpg, pts_pg, ts_pct, pie
order by pie desc
limit 200

where

Chooses the rows the question is about

from nba.player_seasons
where season = 2026
select player, games
order by games desc
limit 10

and

Continues whichever filter clause came last

from nba.player_seasons
where season = 2026 and games > 0
select player, games
order by games desc
limit 10

having

Filters the groups a fold made

from nba.player_seasons
select player, sum(games)
group by player
having sum(games) > 0
order by sum(games) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.player_seasons
where season = 2026
select player, games, games_percentile
keep games_percentile >= 90
order by games_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.player_seasons
select player, season, games
highlight season = 2026
order by games desc
limit 10

of

A threshold that is another row rather than a number

from nba.player_seasons
where games >= max(games) of season 2026
select player, games
order by games desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.player_seasons
select player, count(*), sum(games)
group by player
order by sum(games) desc
limit 10

then

Folds the answer a second time

from nba.player_seasons
select player, team, count(*)
group by player, team
having count(*) > 10
then
select player, count(*) as Teams
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.player_seasons
select player, team, sum(games)
group by player, team
pivot by team
limit 25

first / last

Only part of each career, before anything else runs

from nba.player_seasons
first 3 seasons
select player, sum(games)
group by player
order by sum(games) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.player_seasons
select player, sum(games)
group by player
order by sum(games) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.player_seasons
select player, avg(games)
group by player
order by avg(games) desc
limit 10

min(…)

The smallest value in each group

from nba.player_seasons
select player, min(games)
group by player
order by min(games) desc
limit 10

max(…)

The largest value in each group

from nba.player_seasons
select player, max(games)
group by player
order by max(games) desc
limit 10

count(…)

How many rows a group swallowed

from nba.player_seasons
select player, count(games)
group by player
order by count(games) desc
limit 10

distinct(…)

How many different values a group holds

from nba.player_seasons
select player, distinct(team)
group by player
order by distinct(team) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.player_seasons
where season = 2026
select player, only(team)
group by player
order by only(team) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.player_seasons
select player, latest(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.player_seasons
select player, mean(games)
group by player
order by mean(games) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.player_seasons
select player, median(games)
group by player
order by median(games) desc
limit 10

mode(…)

The commonest value in the group

from nba.player_seasons
select player, mode(player)
group by player
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.player_seasons
where season = 2026
select player, games, games_percentile
order by games_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.player_seasons
select player, sum(games), percentile(sum(games))
group by player
order by sum(games) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.player_seasons
where season = 2026
select player, games, standing(games)
order by games desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.player_seasons
where season = 2026
select player, games, mpg, composite(games, mpg)
order by composite(games, mpg) desc
limit 10

ratio(…)

One column divided by another

from nba.player_seasons
select player, count(*), ratio(sum(games), count(*))
group by player
order by ratio(sum(games), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.player_seasons
where season = 2026
select player, games, mpg, calc(standing(games) - standing(mpg))
order by calc(standing(games) - standing(mpg)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.player_seasons
select player, games, format(games, > 0 -> "on the board", <= 0 -> "nothing yet")
order by games desc
limit 10

pair

Draws two columns of the answer in one

from nba.player_seasons
where season = 2026
select player, games, games_percentile
pair games with games_percentile
order by games desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.player_seasons
where season = 2026
select player, games, mpg, pts_pg, composite(games, mpg, pts_pg) as Score
hint composite(games, mpg, pts_pg) as "GP + MPG + PPG"
order by composite(games, mpg, pts_pg) desc
limit 10

Not on this table

  • top(…) — this table does not say which of its rows is the biggest, so there is no top one to pick
  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along

nba.player_team_seasons Player-team seasons

One row per player per season per club that paid him: cap hit, what he produced, and what the club won.

from nba.player_team_seasons
select player, team, season, cap_hit, pct_of_cap, games, win_share
order by cap_hit desc
limit 200
One row is
one player's season (player-season)
Built from
several tables, each rolled up to shared keys and joined
Reads
nba_player_contract_seasons Spotrac
nba_team_season_cap Spotrac
nba_league_season_cap Spotrac
nba_player_games NBA Stats, hoopR
Shows by default
player team season cap_hit pct_of_cap games win_share
Ordered by
cap_hit desc
Rows
200 by default, 3000 at most
Ranks within
season
Careers counted in
seasons

Before you trust the numbers

  • A row is a season on contract, so a season he was paid for and did not play is here with empty box-score columns.
  • Box scores join to the contract on the player's name and his club — a differently spelled name comes back with empty stats.
  • Est. WS is a box-score proxy: his share of the club's PTS+REB+AST+STL+BLK−TOV, applied to the club's wins and scaled by 0.82.
Dimensions 5
NameBound to
league always nba
team the team column
player the player column
position Neither source carries a position at this grain — query nba.player_games for that
season the season column
Columns 18
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) mode(season)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) mode(player)
NBA Stats · Spotrac · hoopR
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) mode(team)
NBA Stats · Spotrac · hoopR
cap_hit Paid integer
measure

What he counted against the salary cap.

What he counted against the cap at this club this season

What it takes
  • folds: sum(cap_hit) avg(cap_hit) min(cap_hit) max(cap_hit) count(cap_hit) distinct(cap_hit) only(cap_hit) latest(cap_hit) mean(cap_hit) median(cap_hit) mode(cap_hit)
  • ranks: cap_hit_percentile
  • accumulates: as_of(cap_hit)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
pct_of_cap Cap % number
measure

His cap hit as a share of the league cap — a salary with the era divided out.

That cap hit as a share of the league cap that season — the inflation-adjusted figure

What it takes
  • folds: sum(pct_of_cap) avg(pct_of_cap) min(pct_of_cap) max(pct_of_cap) count(pct_of_cap) distinct(pct_of_cap) only(pct_of_cap) latest(pct_of_cap) mean(pct_of_cap) median(pct_of_cap) mode(pct_of_cap)
  • ranks: pct_of_cap_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR · topspin
roster_rank Roster # integer
measure

Where his cap hit sat on his own roster, 1 being the highest paid.

The lowest season Roster # in each group

Ranked over his club's whole roster, not just the rows this query returned

What it takes
  • folds: sum(roster_rank) avg(roster_rank) min(roster_rank) max(roster_rank) count(roster_rank) distinct(roster_rank) only(roster_rank) latest(roster_rank) mean(roster_rank) median(roster_rank) mode(roster_rank)
  • ranks: roster_rank_percentile
  • accumulates: as_of(roster_rank)
  • can be a benchmark
NBA Stats · Spotrac · hoopR · topspin
games GP integer
measure

Games he played in. NBA.com

Regular-season games he played for this club — empty in a season he missed entirely

What it takes
  • folds: sum(games) avg(games) min(games) max(games) count(games) distinct(games) only(games) latest(games) mean(games) median(games) mode(games)
  • ranks: games_percentile
  • accumulates: as_of(games)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
minutes MIN number
measure

Minutes he was on the floor. NBA.com

MIN added up across the games in each group

What it takes
  • folds: sum(minutes) avg(minutes) min(minutes) max(minutes) count(minutes) distinct(minutes) only(minutes) latest(minutes) mean(minutes) median(minutes) mode(minutes)
  • ranks: minutes_percentile
  • accumulates: as_of(minutes)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
production Prod integer
measure

Points, rebounds, assists, steals and blocks less turnovers, as one count.

Prod added up across the games in each group

A box-score total, not a rating — it weights a rebound like a point

What it takes
  • folds: sum(production) avg(production) min(production) max(production) count(production) distinct(production) only(production) latest(production) mean(production) median(production) mode(production)
  • ranks: production_percentile
  • accumulates: as_of(production)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
pts_pg PPG number
measure

Points per game. NBA.com

The mean of the game PTS values in each group, each weighted the same

What it takes
  • folds: sum(pts_pg) avg(pts_pg) min(pts_pg) max(pts_pg) count(pts_pg) distinct(pts_pg) only(pts_pg) latest(pts_pg) mean(pts_pg) median(pts_pg) mode(pts_pg)
  • ranks: pts_pg_percentile
  • accumulates: as_of(pts_pg)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
ts_pct TS% number
measure

True shooting percentage — points per scoring possession, counting twos, threes and free throws together. The single fairest measure of how efficiently a player scores. NBA.com

TS% across the games in each group, as total points over total scoring possessions

What it takes
  • folds: sum(ts_pct) avg(ts_pct) min(ts_pct) max(ts_pct) count(ts_pct) distinct(ts_pct) only(ts_pct) latest(ts_pct) mean(ts_pct) median(ts_pct) mode(ts_pct)
  • ranks: ts_pct_percentile
  • can be a benchmark
NBA Stats · Spotrac · hoopR
team_production Club prod integer
measure

The production of the club's whole roster.

Prod added up across the games in each group

A box-score total, not a rating — it weights a rebound like a point

What it takes
  • folds: sum(team_production) avg(team_production) min(team_production) max(team_production) count(team_production) distinct(team_production) only(team_production) latest(team_production) mean(team_production) median(team_production) mode(team_production)
  • ranks: team_production_percentile
  • accumulates: as_of(team_production)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
team_wins Club W integer
measure

The club's regular-season wins. NBA.com

W added up across the games in each group

A game with no margin recorded counts for neither side

What it takes
  • folds: sum(team_wins) avg(team_wins) min(team_wins) max(team_wins) count(team_wins) distinct(team_wins) only(team_wins) latest(team_wins) mean(team_wins) median(team_wins) mode(team_wins)
  • ranks: team_wins_percentile
  • accumulates: as_of(team_wins)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
mvps MVPs integer
measure

MVP awards won.

MVP added up across the seasons in each group

What it takes
  • folds: sum(mvps) avg(mvps) min(mvps) max(mvps) count(mvps) distinct(mvps) only(mvps) latest(mvps) mean(mvps) median(mvps) mode(mvps)
  • ranks: mvps_percentile
  • accumulates: as_of(mvps)
  • can be a benchmark
NBA Stats · Spotrac · hoopR · topspin
titles Titles integer
measure

Championships won.

Title added up across the seasons in each group

What it takes
  • folds: sum(titles) avg(titles) min(titles) max(titles) count(titles) distinct(titles) only(titles) latest(titles) mean(titles) median(titles) mode(titles)
  • ranks: titles_percentile
  • accumulates: as_of(titles)
  • can be a benchmark
NBA Stats · Spotrac · hoopR · topspin
win_share Est. WS number
measure

An estimate of how many of his club's wins were his.

His share of his club's production, applied to his club's wins and scaled by 0.82

A box-score proxy, not Basketball-Reference win shares — it credits a rebound like a point and knows nothing about defence

What it takes
  • folds: sum(win_share) avg(win_share) min(win_share) max(win_share) count(win_share) distinct(win_share) only(win_share) latest(win_share) mean(win_share) median(win_share) mode(win_share)
  • ranks: win_share_percentile
  • accumulates: as_of(win_share)
  • can be a benchmark
NBA Stats · Spotrac · hoopR
rank computed lower is better # integer
measure

Where the row placed in this result under your order by; ties share a number and the next place skips past them (1, 2, 2, 4).

NBA Stats · Spotrac · hoopR
pctile computed %ile integer
measure

Where the row sits within the rows this query returned, 0 to 100 — <stat>_percentile ranks against the whole season instead.

NBA Stats · Spotrac · hoopR
Rates this table names 3

gp_per_season GP/Season

built from sum(games) count(*)

Games played per season under contract.

Games played per season on the books — availability, over a tenure

from nba.player_team_seasons
select player, gp_per_season
group by player
order by gp_per_season desc
limit 10

cap_per_ws $/WS

built from sum(cap_hit) sum(win_share)

Dollars of cap hit per estimated win share.

Nominal dollars — a 2014 win share and a 2025 one cost different money, so adj_cap_per_ws compares eras and this does not

from nba.player_team_seasons
select player, cap_per_ws
group by player
order by cap_per_ws desc
limit 10

adj_cap_per_ws Adj. Cap%/WS

built from avg(pct_of_cap) sum(win_share)

Share of the cap per estimated win share, which is the same question with inflation removed.

from nba.player_team_seasons
select player, adj_cap_per_ws
group by player
order by adj_cap_per_ws desc
limit 10
Operators on this table 37 available, 6 not

from

The one table a query reads

from nba.player_team_seasons
select player, team, season, cap_hit, pct_of_cap, games, win_share
order by cap_hit desc
limit 200

select

The columns the answer carries

from nba.player_team_seasons
select player, team, season, cap_hit, pct_of_cap, games, win_share
order by cap_hit desc
limit 200

as

Renames a column's heading and nothing else

from nba.player_team_seasons
select player, team, cap_hit as Paid
order by cap_hit desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.player_team_seasons
where season = $year
select player, team, season
order by cap_hit desc
limit 10

limit

How many rows come back

from nba.player_team_seasons
select player, team, season, cap_hit, pct_of_cap, games, win_share
order by cap_hit desc
limit 200

order by

Which end of the answer comes first

from nba.player_team_seasons
select player, team, season, cap_hit
order by cap_hit desc
limit 10

#

A comment, to the end of the line

# Player-team seasons — One row per player per season per club that paid him: cap hit, what he produced, and what the club won.
from nba.player_team_seasons
select player, team, season, cap_hit, pct_of_cap, games, win_share
order by cap_hit desc
limit 200

where

Chooses the rows the question is about

from nba.player_team_seasons
where season = 2026
select player, cap_hit
order by cap_hit desc
limit 10

and

Continues whichever filter clause came last

from nba.player_team_seasons
where season = 2026 and cap_hit > 0
select player, cap_hit
order by cap_hit desc
limit 10

having

Filters the groups a fold made

from nba.player_team_seasons
select player, sum(cap_hit)
group by player
having sum(cap_hit) > 0
order by sum(cap_hit) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.player_team_seasons
where season = 2026
select player, cap_hit, cap_hit_percentile
keep cap_hit_percentile >= 90
order by cap_hit_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.player_team_seasons
select player, season, cap_hit
highlight season = 2026
order by cap_hit desc
limit 10

of

A threshold that is another row rather than a number

from nba.player_team_seasons
where cap_hit >= max(cap_hit) of season 2026
select player, cap_hit
order by cap_hit desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.player_team_seasons
select player, count(*), sum(cap_hit)
group by player
order by sum(cap_hit) desc
limit 10

then

Folds the answer a second time

from nba.player_team_seasons
select player, season, count(*)
group by player, season
having count(*) > 10
then
select player, count(*) as Seasons
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.player_team_seasons
select player, season, sum(cap_hit)
group by player, season
pivot by season
limit 25

first / last

Only part of each career, before anything else runs

from nba.player_team_seasons
first 3 seasons
select player, sum(cap_hit)
group by player
order by sum(cap_hit) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.player_team_seasons
select player, sum(cap_hit)
group by player
order by sum(cap_hit) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.player_team_seasons
select player, avg(cap_hit)
group by player
order by avg(cap_hit) desc
limit 10

min(…)

The smallest value in each group

from nba.player_team_seasons
select player, min(cap_hit)
group by player
order by min(cap_hit) desc
limit 10

max(…)

The largest value in each group

from nba.player_team_seasons
select player, max(cap_hit)
group by player
order by max(cap_hit) desc
limit 10

count(…)

How many rows a group swallowed

from nba.player_team_seasons
select player, count(cap_hit)
group by player
order by count(cap_hit) desc
limit 10

distinct(…)

How many different values a group holds

from nba.player_team_seasons
select player, distinct(season)
group by player
order by distinct(season) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.player_team_seasons
where season = 2026
select player, only(season)
group by player
order by only(season) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.player_team_seasons
select player, latest(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.player_team_seasons
select player, mean(cap_hit)
group by player
order by mean(cap_hit) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.player_team_seasons
select player, median(cap_hit)
group by player
order by median(cap_hit) desc
limit 10

mode(…)

The commonest value in the group

from nba.player_team_seasons
select player, mode(player)
group by player
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.player_team_seasons
where season = 2026
select player, cap_hit, cap_hit_percentile
order by cap_hit_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.player_team_seasons
select player, sum(cap_hit), percentile(sum(cap_hit))
group by player
order by sum(cap_hit) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.player_team_seasons
where season = 2026
select player, cap_hit, standing(cap_hit)
order by cap_hit desc
limit 10

composite(…)

One 0-100 score standing for several stats at once

from nba.player_team_seasons
where season = 2026
select player, cap_hit, pct_of_cap, composite(cap_hit, pct_of_cap)
order by composite(cap_hit, pct_of_cap) desc
limit 10

ratio(…)

One column divided by another

from nba.player_team_seasons
select player, count(*), ratio(sum(cap_hit), count(*))
group by player
order by ratio(sum(cap_hit), count(*)) desc
limit 10

calc(…)

Arithmetic over any columns the table can build

from nba.player_team_seasons
where season = 2026
select player, cap_hit, pct_of_cap, calc(standing(cap_hit) - standing(pct_of_cap))
order by calc(standing(cap_hit) - standing(pct_of_cap)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.player_team_seasons
select player, cap_hit, format(cap_hit, > 0 -> "on the board", <= 0 -> "nothing yet")
order by cap_hit desc
limit 10

pair

Draws two columns of the answer in one

from nba.player_team_seasons
where season = 2026
select player, cap_hit, cap_hit_percentile
pair cap_hit with cap_hit_percentile
order by cap_hit desc
limit 10

hint

Shows a sentence on a heading when the pointer rests on it

from nba.player_team_seasons
where season = 2026
select player, cap_hit, pct_of_cap, roster_rank, composite(cap_hit, pct_of_cap, roster_rank) as Score
hint composite(cap_hit, pct_of_cap, roster_rank) as "Paid + Cap % + Roster #"
order by composite(cap_hit, pct_of_cap, roster_rank) desc
limit 10

Not on this table

  • top(…) — this table does not say which of its rows is the biggest, so there is no top one to pick
  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along

nba.mvps MVPs

The regular-season MVP for each season, and the club he won it with.

from nba.mvps
select season, player, team
order by season desc
limit 100
One row is
one player's season (player-season)
Built from
a handler — joins or windows a plain select cannot reach
Reads
nba_mvp_awards topspin
Shows by default
season player team
Ordered by
season desc
Rows
100 by default, 200 at most
Ranks within
season
Careers counted in
seasons

Before you trust the numbers

  • Maintained by hand, 1976 to 2024.
Dimensions 5
NameBound to
league always nba
team the team column
player the player column
position An award list carries no positions — query nba.player_games for that
season the season column
Columns 4
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) mode(season)
  • can be a benchmark
topspin
player completes player Player string
dimension

The player.

What it takes
  • folds: count(player) distinct(player) only(player) latest(player) mode(player)
topspin
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) mode(team)
topspin
mvp MVP integer
measure

An MVP award, as a 1 to be counted.

Always 1 — a column to fold, so awards can be counted

What it takes
  • folds: sum(mvp) avg(mvp) min(mvp) max(mvp) count(mvp) distinct(mvp) only(mvp) latest(mvp) mean(mvp) median(mvp) mode(mvp)
  • ranks: mvp_percentile
  • accumulates: as_of(mvp)
  • can be a benchmark
topspin
Operators on this table 34 available, 9 not

from

The one table a query reads

from nba.mvps
select season, player, team
order by season desc
limit 100

select

The columns the answer carries

from nba.mvps
select season, player, team
order by season desc
limit 100

as

Renames a column's heading and nothing else

from nba.mvps
select season, player, mvp as MVP
order by mvp desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.mvps
where season = $year
select season, player, team
order by mvp desc
limit 10

limit

How many rows come back

from nba.mvps
select season, player, team
order by season desc
limit 100

order by

Which end of the answer comes first

from nba.mvps
select season, player, team, mvp
order by mvp desc
limit 10

#

A comment, to the end of the line

# MVPs — The regular-season MVP for each season, and the club he won it with.
from nba.mvps
select season, player, team
order by season desc
limit 100

where

Chooses the rows the question is about

from nba.mvps
where season = 2026
select player, mvp
order by mvp desc
limit 10

and

Continues whichever filter clause came last

from nba.mvps
where season = 2026 and mvp > 0
select player, mvp
order by mvp desc
limit 10

having

Filters the groups a fold made

from nba.mvps
select player, sum(mvp)
group by player
having sum(mvp) > 0
order by sum(mvp) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.mvps
where season = 2026
select player, mvp, mvp_percentile
keep mvp_percentile >= 90
order by mvp_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.mvps
select player, season, mvp
highlight season = 2026
order by mvp desc
limit 10

of

A threshold that is another row rather than a number

from nba.mvps
where mvp >= max(mvp) of season 2026
select player, mvp
order by mvp desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.mvps
select player, count(*), sum(mvp)
group by player
order by sum(mvp) desc
limit 10

then

Folds the answer a second time

from nba.mvps
select player, season, count(*)
group by player, season
having count(*) > 10
then
select player, count(*) as Seasons
group by player
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.mvps
select player, season, sum(mvp)
group by player, season
pivot by season
limit 25

first / last

Only part of each career, before anything else runs

from nba.mvps
first 3 seasons
select player, sum(mvp)
group by player
order by sum(mvp) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.mvps
select player, sum(mvp)
group by player
order by sum(mvp) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.mvps
select player, avg(mvp)
group by player
order by avg(mvp) desc
limit 10

min(…)

The smallest value in each group

from nba.mvps
select player, min(mvp)
group by player
order by min(mvp) desc
limit 10

max(…)

The largest value in each group

from nba.mvps
select player, max(mvp)
group by player
order by max(mvp) desc
limit 10

count(…)

How many rows a group swallowed

from nba.mvps
select player, count(mvp)
group by player
order by count(mvp) desc
limit 10

distinct(…)

How many different values a group holds

from nba.mvps
select player, distinct(season)
group by player
order by distinct(season) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.mvps
where season = 2026
select player, only(season)
group by player
order by only(season) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.mvps
select player, latest(player)
group by player
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.mvps
select player, mean(mvp)
group by player
order by mean(mvp) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.mvps
select player, median(mvp)
group by player
order by median(mvp) desc
limit 10

mode(…)

The commonest value in the group

from nba.mvps
select player, mode(player)
group by player
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.mvps
where season = 2026
select player, mvp, mvp_percentile
order by mvp_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.mvps
select player, sum(mvp), percentile(sum(mvp))
group by player
order by sum(mvp) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.mvps
where season = 2026
select player, mvp, standing(mvp)
order by mvp desc
limit 10

ratio(…)

One column divided by another

from nba.mvps
select player, count(*), ratio(sum(mvp), count(*))
group by player
order by ratio(sum(mvp), count(*)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.mvps
select player, mvp, format(mvp, > 0 -> "on the board", <= 0 -> "nothing yet")
order by mvp desc
limit 10

pair

Draws two columns of the answer in one

from nba.mvps
where season = 2026
select player, mvp, mvp_percentile
pair mvp with mvp_percentile
order by mvp desc
limit 10

Not on this table

  • top(…) — this table does not say which of its rows is the biggest, so there is no top one to pick
  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along
  • composite(…) — a score needs two stats this table can rank, and it has fewer
  • calc(…) — this table has fewer than two numbers to do arithmetic between
  • hint — the example hints a score, and this table has fewer than two stats to score

nba.titles Championships

The club that won the Finals in each season.

from nba.titles
select season, team
order by season desc
limit 100
One row is
one team's season (team-season)
Built from
a handler — joins or windows a plain select cannot reach
Reads
nba_championships topspin
Shows by default
season team
Ordered by
season desc
Rows
100 by default, 200 at most
Ranks within
season
Careers counted in
seasons

Before you trust the numbers

  • Maintained by hand, 1976 to 2025.
Dimensions 5
NameBound to
league always nba
team the team column
player A title belongs to a club — query nba.player_team_seasons for who was on it
position A title belongs to a club, and a club has no position
season the season column
Columns 3
NameHeadingTypeWhat it is
season completes season Season season
dimension

The season, by the year it started — 2024 is the 2024-25 season.

What it takes
  • folds: min(season) max(season) count(season) distinct(season) only(season) latest(season) mode(season)
  • can be a benchmark
topspin
team completes team Team string
dimension

The club.

What it takes
  • folds: count(team) distinct(team) only(team) latest(team) mode(team)
topspin
title Title integer
measure

A championship, as a 1 to be counted.

Always 1 — a column to fold, so titles can be counted

What it takes
  • folds: sum(title) avg(title) min(title) max(title) count(title) distinct(title) only(title) latest(title) mean(title) median(title) mode(title)
  • ranks: title_percentile
  • accumulates: as_of(title)
  • can be a benchmark
topspin
Operators on this table 34 available, 9 not

from

The one table a query reads

from nba.titles
select season, team
order by season desc
limit 100

select

The columns the answer carries

from nba.titles
select season, team
order by season desc
limit 100

as

Renames a column's heading and nothing else

from nba.titles
select season, team, title as Title
order by title desc
limit 10

let

A value written once and referred to as $name

let year = 2026
from nba.titles
where season = $year
select season, team
order by title desc
limit 10

limit

How many rows come back

from nba.titles
select season, team
order by season desc
limit 100

order by

Which end of the answer comes first

from nba.titles
select season, team, title
order by title desc
limit 10

#

A comment, to the end of the line

# Championships — The club that won the Finals in each season.
from nba.titles
select season, team
order by season desc
limit 100

where

Chooses the rows the question is about

from nba.titles
where season = 2026
select team, title
order by title desc
limit 10

and

Continues whichever filter clause came last

from nba.titles
where season = 2026 and title > 0
select team, title
order by title desc
limit 10

having

Filters the groups a fold made

from nba.titles
select team, sum(title)
group by team
having sum(title) > 0
order by sum(title) desc
limit 10

keep

where, moved one layer out — after the ranking

from nba.titles
where season = 2026
select team, title, title_percentile
keep title_percentile >= 90
order by title_percentile desc
limit 10

highlight

Points at rows instead of choosing them

from nba.titles
select team, season, title
highlight season = 2026
order by title desc
limit 10

of

A threshold that is another row rather than a number

from nba.titles
where title >= max(title) of season 2026
select team, title
order by title desc
limit 10

group by

Folds the rows sharing these keys into one

from nba.titles
select team, count(*), sum(title)
group by team
order by sum(title) desc
limit 10

then

Folds the answer a second time

from nba.titles
select team, season, count(*)
group by team, season
having count(*) > 10
then
select team, count(*) as Seasons
group by team
order by count(*) desc
limit 10

pivot by

Reads the answer as a matrix

from nba.titles
select team, season, sum(title)
group by team, season
pivot by season
limit 25

first / last

Only part of each career, before anything else runs

from nba.titles
first 3 seasons
select team, sum(title)
group by team
order by sum(title) desc
limit 10

sum(…)

Adds a stat up across the rows in each group

from nba.titles
select team, sum(title)
group by team
order by sum(title) desc
limit 10

avg(…)

The mean of a stat, with rates rebuilt rather than averaged

from nba.titles
select team, avg(title)
group by team
order by avg(title) desc
limit 10

min(…)

The smallest value in each group

from nba.titles
select team, min(title)
group by team
order by min(title) desc
limit 10

max(…)

The largest value in each group

from nba.titles
select team, max(title)
group by team
order by max(title) desc
limit 10

count(…)

How many rows a group swallowed

from nba.titles
select team, count(title)
group by team
order by count(title) desc
limit 10

distinct(…)

How many different values a group holds

from nba.titles
select team, distinct(season)
group by team
order by distinct(season) desc
limit 10

only(…)

The one value in the group, and an error if there are two

from nba.titles
where season = 2026
select team, only(season)
group by team
order by only(season) desc
limit 10

latest(…)

The newest row's value, rather than a number

from nba.titles
select team, latest(team)
group by team
order by count(*) desc
limit 10

mean(…)

The plain arithmetic mean, whatever the column says about itself

from nba.titles
select team, mean(title)
group by team
order by mean(title) desc
limit 10

median(…)

The middle value in the group — half above it, half below

from nba.titles
select team, median(title)
group by team
order by median(title) desc
limit 10

mode(…)

The commonest value in the group

from nba.titles
select team, mode(team)
group by team
order by count(*) desc
limit 10

<stat>_percentile

Where a row sits in its population, 0-100

from nba.titles
where season = 2026
select team, title, title_percentile
order by title_percentile desc
limit 10

percentile(…)

Where a folded group ranks among the other groups

from nba.titles
select team, sum(title), percentile(sum(title))
group by team
order by sum(title) desc
limit 10

standing(…)

The same window, read as a place — 1 being best

from nba.titles
where season = 2026
select team, title, standing(title)
order by title desc
limit 10

ratio(…)

One column divided by another

from nba.titles
select team, count(*), ratio(sum(title), count(*))
group by team
order by ratio(sum(title), count(*)) desc
limit 10

format(…)

Prints a column's values as words, changing nothing else

from nba.titles
select team, title, format(title, > 0 -> "on the board", <= 0 -> "nothing yet")
order by title desc
limit 10

pair

Draws two columns of the answer in one

from nba.titles
where season = 2026
select team, title, title_percentile
pair title with title_percentile
order by title desc
limit 10

Not on this table

  • top(…) — this table does not say which of its rows is the biggest, so there is no top one to pick
  • year(…) — this table has no date column to read a period off
  • quarter(…) — this table has no date column to read a period off
  • month(…) — this table has no date column to read a period off
  • week(…) — this table has no date column to read a period off
  • as_of(…) — this table has no time axis to accumulate along
  • composite(…) — a score needs two stats this table can rank, and it has fewer
  • calc(…) — this table has fewer than two numbers to do arithmetic between
  • hint — the example hints a score, and this table has fewer than two stats to score
Back to top