Anthony Davis vs. Luka Dončić: Head-to-Head Stats Comparison
--------------------------------------
header_comp
WITH
h2h_record AS (
SELECT p1.person_id as p1_person_id, SUM(p1.win AND p1.type="reg") as p1_rs_wins, SUM(p1.win AND p1.type="post") as p1_po_wins, SUM(p1.loss AND p1.type="reg") as p1_rs_losses, SUM(p1.loss AND p1.type="post") as p1_po_losses, SUM(p1.tie AND p1.type="reg") as p1_rs_ties, SUM(p1.tie AND p1.type="post") as p1_po_ties, p2.person_id as p2_person_id, SUM(p2.win AND p2.type="reg") as p2_rs_wins, SUM(p2.win AND p2.type="post") as p2_po_wins, SUM(p2.loss AND p2.type="reg") as p2_rs_losses, SUM(p2.loss AND p2.type="post") as p2_po_losses, SUM(p2.tie AND p2.type="reg") as p2_rs_ties, SUM(p2.tie AND p2.type="post") as p2_po_ties
FROM (SELECT person_id, win as win, loss as loss, tie as tie, game_id, type, team_id
FROM sup_team_games
JOIN sup_games USING (game_id)
JOIN sup_player_games USING (game_id, team_id)
JOIN sup_phase_seasons USING (year_id, comp_id, phase_id)
WHERE person_id=? ) as p1
JOIN (SELECT person_id, win as win, loss as loss, tie as tie, game_id, type, team_id FROM sup_team_games
JOIN sup_games USING (game_id)
JOIN sup_player_games USING (game_id, team_id)
JOIN sup_phase_seasons USING (year_id, comp_id, phase_id)
WHERE person_id=? ) as p2 ON p1.game_id=p2.game_id AND p1.team_id!=p2.team_id
),
h2h_record_tot AS (
SELECT person_id, rs_wins, rs_losses, rs_ties, po_wins, po_losses, po_ties
FROM (SELECT p1_person_id as person_id, p1_rs_wins as rs_wins, p1_rs_losses as rs_losses, p1_rs_ties as rs_ties, p1_po_wins as po_wins, p1_po_losses as po_losses, p1_po_ties as po_ties
FROM h2h_record
UNION SELECT p2_person_id as person_id, p2_rs_wins as rs_wins, p2_rs_losses as rs_losses, p2_rs_ties as rs_ties, p2_po_wins as po_wins, p2_po_losses as po_losses, p2_po_ties as po_ties
FROM h2h_record) as zzz
WHERE 1
)
SELECT person_id, rs_wins, rs_losses, rs_ties, po_wins, po_losses, po_ties, SUM(games) AS games, (SUM(pts))/(SUM(games)) as pts_per_g_csk, ROUND((SUM(pts))/(SUM(games)),1) AS pts_per_g, (SUM(trb))/(SUM(games*(trb IS NOT NULL))) as trb_per_g_csk, ROUND((SUM(trb))/(SUM(games*(trb IS NOT NULL))),1) AS trb_per_g, (SUM(ast))/(SUM(games*(ast IS NOT NULL))) as ast_per_g_csk, ROUND((SUM(ast))/(SUM(games*(ast IS NOT NULL))),1) AS ast_per_g, (SUM(stl))/(SUM(games*(stl IS NOT NULL))) as stl_per_g_csk, ROUND((SUM(stl))/(SUM(games*(stl IS NOT NULL))),1) AS stl_per_g, (SUM(blk))/(SUM(games*(blk IS NOT NULL))) as blk_per_g_csk, ROUND((SUM(blk))/(SUM(games*(blk IS NOT NULL))),1) AS blk_per_g, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL) as efg_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL),3)) AS efg_pct, (SUM(bpm * mp) / SUM((bpm IS NOT NULL) * mp)) as bpm_csk, ROUND((SUM(bpm * mp) / SUM((bpm IS NOT NULL) * mp)),1) AS bpm, SUM(vorp) as vorp_csk, ROUND(SUM(vorp),1) AS vorp
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
LEFT JOIN h2h_record_tot USING (person_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'doncilu01',
'davisan02',
'davisan02',
'doncilu01'
];
SELECT name_short, name, award_id FROM sup_awards WHERE award_id IN ("all-nba-1","all-aba-1","all-wnba-1","all-nba-n","all-aba-n","all-wnba-n","all-defensive-n","mvp","dpoy","finals-mvp","playoffs-mvp","all-star") GROUP BY award_id
SQL PARAMS -- $VAR1 = [];
WITH
champ AS (
SELECT person_id, COUNT(*) as championships
FROM sup_player_team_seasons
LEFT JOIN sup_team_seasons USING (team_id, year_id, comp_id, phase_id)
WHERE person_id=? AND phase_id='REG' AND is_lg_champ=1
),
awards AS (
SELECT person_id,
SUM(award_id="all-aba-1") as `all-aba-1`, SUM(award_id="all-aba-n") as `all-aba-n`, SUM(award_id="all-defensive-n") as `all-defensive-n`, SUM(award_id="all-nba-1") as `all-nba-1`, SUM(award_id="all-nba-n") as `all-nba-n`, SUM(award_id="all-star") as `all-star`, SUM(award_id="all-wnba-1") as `all-wnba-1`, SUM(award_id="all-wnba-n") as `all-wnba-n`, SUM(award_id="dpoy") as `dpoy`, SUM(award_id="finals-mvp") as `finals-mvp`, SUM(award_id="mvp") as `mvp`, SUM(award_id="playoffs-mvp") as `playoffs-mvp`
FROM sup_awards_players
WHERE person_id=?
)
SELECT person_id, is_hof, championships, awards.* FROM sup_players
LEFT JOIN awards USING (person_id)
LEFT JOIN champ USING (person_id)
WHERE person_id=?
SQL PARAMS -- $VAR1 = [
'doncilu01',
'doncilu01',
'doncilu01'
];
WITH
champ AS (
SELECT person_id, COUNT(*) as championships
FROM sup_player_team_seasons
LEFT JOIN sup_team_seasons USING (team_id, year_id, comp_id, phase_id)
WHERE person_id=? AND phase_id='REG' AND is_lg_champ=1
),
awards AS (
SELECT person_id,
SUM(award_id="all-aba-1") as `all-aba-1`, SUM(award_id="all-aba-n") as `all-aba-n`, SUM(award_id="all-defensive-n") as `all-defensive-n`, SUM(award_id="all-nba-1") as `all-nba-1`, SUM(award_id="all-nba-n") as `all-nba-n`, SUM(award_id="all-star") as `all-star`, SUM(award_id="all-wnba-1") as `all-wnba-1`, SUM(award_id="all-wnba-n") as `all-wnba-n`, SUM(award_id="dpoy") as `dpoy`, SUM(award_id="finals-mvp") as `finals-mvp`, SUM(award_id="mvp") as `mvp`, SUM(award_id="playoffs-mvp") as `playoffs-mvp`
FROM sup_awards_players
WHERE person_id=?
)
SELECT person_id, is_hof, championships, awards.* FROM sup_players
LEFT JOIN awards USING (person_id)
LEFT JOIN champ USING (person_id)
WHERE person_id=?
SQL PARAMS -- $VAR1 = [
'davisan02',
'davisan02',
'davisan02'
];
--------------------------------------
h2h_pg
Page Setup Time: 0.00416 seconds
WITH
pgames AS (
SELECT person_id, game_id, team_id, year_id
FROM sup_team_games
JOIN sup_player_games USING (game_id, team_id)
JOIN sup_phase_seasons USING (year_id, comp_id, phase_id)
WHERE 1
),
pgames_list AS (
SELECT p1.game_id
FROM (SELECT game_id, team_id
FROM pgames
WHERE person_id=? ) as p1
JOIN (SELECT game_id, team_id FROM pgames WHERE person_id=? ) as p2 ON p1.game_id=p2.game_id AND p1.team_id!=p2.team_id
)
SELECT person_id, COUNT(*) AS games, SUM(is_starter) AS games_started, (SUM(mp))/((COUNT(*)-SUM(mp IS NULL))) as mp_per_g_csk, ROUND((SUM(mp))/((COUNT(*)-SUM(mp IS NULL))),1) AS mp_per_g, (SUM(fg))/(COUNT(*)) as fg_per_g_csk, ROUND((SUM(fg))/(COUNT(*)),1) AS fg_per_g, (SUM(fga))/(COUNT(*)) as fga_per_g_csk, ROUND((SUM(fga))/(COUNT(*)),1) AS fga_per_g, (SUM(fg)/(COUNT(*)) - IFNULL(SUM(fg3 * (fg IS NOT NULL))/(COUNT(*)-SUM(fg IS NULL)), 0)) as fg2_per_g_csk, ROUND((SUM(fg)/(COUNT(*)) - IFNULL(SUM(fg3 * (fg IS NOT NULL))/(COUNT(*)-SUM(fg IS NULL)), 0)),1) AS fg2_per_g, (SUM(fga)/(COUNT(*)) - IFNULL(SUM(fg3a * (fga IS NOT NULL))/(COUNT(*)-SUM(fga IS NULL)), 0)) as fg2a_per_g_csk, ROUND((SUM(fga)/(COUNT(*)) - IFNULL(SUM(fg3a * (fga IS NOT NULL))/(COUNT(*)-SUM(fga IS NULL)), 0)),1) AS fg2a_per_g, (SUM(fg3))/((COUNT(*)-SUM(fg3 IS NULL))) as fg3_per_g_csk, ROUND((SUM(fg3))/((COUNT(*)-SUM(fg3 IS NULL))),1) AS fg3_per_g, (SUM(fg3a))/((COUNT(*)-SUM(fg3a IS NULL))) as fg3a_per_g_csk, ROUND((SUM(fg3a))/((COUNT(*)-SUM(fg3a IS NULL))),1) AS fg3a_per_g, (SUM(ft))/(COUNT(*)) as ft_per_g_csk, ROUND((SUM(ft))/(COUNT(*)),1) AS ft_per_g, (SUM(fta))/((COUNT(*)-SUM(fta IS NULL))) as fta_per_g_csk, ROUND((SUM(fta))/((COUNT(*)-SUM(fta IS NULL))),1) AS fta_per_g, (SUM(orb))/((COUNT(*)-SUM(orb IS NULL))) as orb_per_g_csk, ROUND((SUM(orb))/((COUNT(*)-SUM(orb IS NULL))),1) AS orb_per_g, (SUM(trb * (orb IS NOT NULL))/(COUNT(*)-SUM(orb IS NULL)) - SUM(orb * (orb IS NOT NULL))/(COUNT(*)-SUM(orb IS NULL))) as drb_per_g_csk, ROUND((SUM(trb * (orb IS NOT NULL))/(COUNT(*)-SUM(orb IS NULL)) - SUM(orb * (orb IS NOT NULL))/(COUNT(*)-SUM(orb IS NULL))),1) AS drb_per_g, (SUM(trb))/((COUNT(*)-SUM(trb IS NULL))) as trb_per_g_csk, ROUND((SUM(trb))/((COUNT(*)-SUM(trb IS NULL))),1) AS trb_per_g, (SUM(ast))/((COUNT(*)-SUM(ast IS NULL))) as ast_per_g_csk, ROUND((SUM(ast))/((COUNT(*)-SUM(ast IS NULL))),1) AS ast_per_g, (SUM(stl))/((COUNT(*)-SUM(stl IS NULL))) as stl_per_g_csk, ROUND((SUM(stl))/((COUNT(*)-SUM(stl IS NULL))),1) AS stl_per_g, (SUM(blk))/((COUNT(*)-SUM(blk IS NULL))) as blk_per_g_csk, ROUND((SUM(blk))/((COUNT(*)-SUM(blk IS NULL))),1) AS blk_per_g, (SUM(tov))/((COUNT(*)-SUM(tov IS NULL))) as tov_per_g_csk, ROUND((SUM(tov))/((COUNT(*)-SUM(tov IS NULL))),1) AS tov_per_g, (SUM(pf))/((COUNT(*)-SUM(pf IS NULL))) as pf_per_g_csk, ROUND((SUM(pf))/((COUNT(*)-SUM(pf IS NULL))),1) AS pf_per_g, (SUM(pts))/(COUNT(*)) as pts_per_g_csk, ROUND((SUM(pts))/(COUNT(*)),1) AS pts_per_g
FROM sup_player_games as st
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral FROM sup_team_games) as tg USING (game_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN (SELECT team_id, year_id, name_abbr, name, link FROM sup_team_seasons GROUP BY team_id, year_id ) as ts USING (team_id, year_id)
JOIN sup_games USING (game_id)
JOIN pgames_list USING (game_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
GROUP BY person_id LIMIT 0, 200
SQL PARAMS -- $VAR1 = [
'doncilu01',
'davisan02',
'davisan02',
'doncilu01'
];
Query Time: 0.05 seconds
WITH
pgames AS (
SELECT person_id, game_id, team_id, year_id
FROM sup_team_games
JOIN sup_player_games USING (game_id, team_id)
JOIN sup_phase_seasons USING (year_id, comp_id, phase_id)
WHERE 1
),
pgames_list AS (
SELECT p1.game_id
FROM (SELECT game_id, team_id
FROM pgames
WHERE person_id=? ) as p1
JOIN (SELECT game_id, team_id FROM pgames WHERE person_id=? ) as p2 ON p1.game_id=p2.game_id AND p1.team_id!=p2.team_id
)
SELECT person_id, COUNT(*) AS games, SUM(is_starter) AS games_started, (SUM(mp))/((COUNT(*)-SUM(mp IS NULL))) as mp_per_g_csk, ROUND((SUM(mp))/((COUNT(*)-SUM(mp IS NULL))),1) AS mp_per_g, (SUM(fg))/(COUNT(*)) as fg_per_g_csk, ROUND((SUM(fg))/(COUNT(*)),1) AS fg_per_g, (SUM(fga))/(COUNT(*)) as fga_per_g_csk, ROUND((SUM(fga))/(COUNT(*)),1) AS fga_per_g, (SUM(fg)/(COUNT(*)) - IFNULL(SUM(fg3 * (fg IS NOT NULL))/(COUNT(*)-SUM(fg IS NULL)), 0)) as fg2_per_g_csk, ROUND((SUM(fg)/(COUNT(*)) - IFNULL(SUM(fg3 * (fg IS NOT NULL))/(COUNT(*)-SUM(fg IS NULL)), 0)),1) AS fg2_per_g, (SUM(fga)/(COUNT(*)) - IFNULL(SUM(fg3a * (fga IS NOT NULL))/(COUNT(*)-SUM(fga IS NULL)), 0)) as fg2a_per_g_csk, ROUND((SUM(fga)/(COUNT(*)) - IFNULL(SUM(fg3a * (fga IS NOT NULL))/(COUNT(*)-SUM(fga IS NULL)), 0)),1) AS fg2a_per_g, (SUM(fg3))/((COUNT(*)-SUM(fg3 IS NULL))) as fg3_per_g_csk, ROUND((SUM(fg3))/((COUNT(*)-SUM(fg3 IS NULL))),1) AS fg3_per_g, (SUM(fg3a))/((COUNT(*)-SUM(fg3a IS NULL))) as fg3a_per_g_csk, ROUND((SUM(fg3a))/((COUNT(*)-SUM(fg3a IS NULL))),1) AS fg3a_per_g, (SUM(ft))/(COUNT(*)) as ft_per_g_csk, ROUND((SUM(ft))/(COUNT(*)),1) AS ft_per_g, (SUM(fta))/((COUNT(*)-SUM(fta IS NULL))) as fta_per_g_csk, ROUND((SUM(fta))/((COUNT(*)-SUM(fta IS NULL))),1) AS fta_per_g, (SUM(orb))/((COUNT(*)-SUM(orb IS NULL))) as orb_per_g_csk, ROUND((SUM(orb))/((COUNT(*)-SUM(orb IS NULL))),1) AS orb_per_g, (SUM(trb * (orb IS NOT NULL))/(COUNT(*)-SUM(orb IS NULL)) - SUM(orb * (orb IS NOT NULL))/(COUNT(*)-SUM(orb IS NULL))) as drb_per_g_csk, ROUND((SUM(trb * (orb IS NOT NULL))/(COUNT(*)-SUM(orb IS NULL)) - SUM(orb * (orb IS NOT NULL))/(COUNT(*)-SUM(orb IS NULL))),1) AS drb_per_g, (SUM(trb))/((COUNT(*)-SUM(trb IS NULL))) as trb_per_g_csk, ROUND((SUM(trb))/((COUNT(*)-SUM(trb IS NULL))),1) AS trb_per_g, (SUM(ast))/((COUNT(*)-SUM(ast IS NULL))) as ast_per_g_csk, ROUND((SUM(ast))/((COUNT(*)-SUM(ast IS NULL))),1) AS ast_per_g, (SUM(stl))/((COUNT(*)-SUM(stl IS NULL))) as stl_per_g_csk, ROUND((SUM(stl))/((COUNT(*)-SUM(stl IS NULL))),1) AS stl_per_g, (SUM(blk))/((COUNT(*)-SUM(blk IS NULL))) as blk_per_g_csk, ROUND((SUM(blk))/((COUNT(*)-SUM(blk IS NULL))),1) AS blk_per_g, (SUM(tov))/((COUNT(*)-SUM(tov IS NULL))) as tov_per_g_csk, ROUND((SUM(tov))/((COUNT(*)-SUM(tov IS NULL))),1) AS tov_per_g, (SUM(pf))/((COUNT(*)-SUM(pf IS NULL))) as pf_per_g_csk, ROUND((SUM(pf))/((COUNT(*)-SUM(pf IS NULL))),1) AS pf_per_g, (SUM(pts))/(COUNT(*)) as pts_per_g_csk, ROUND((SUM(pts))/(COUNT(*)),1) AS pts_per_g
FROM sup_player_games as st
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral FROM sup_team_games) as tg USING (game_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN (SELECT team_id, year_id, name_abbr, name, link FROM sup_team_seasons GROUP BY team_id, year_id ) as ts USING (team_id, year_id)
JOIN sup_games USING (game_id)
JOIN pgames_list USING (game_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="post"
GROUP BY person_id LIMIT 0, 200
SQL PARAMS -- $VAR1 = [
'doncilu01',
'davisan02',
'davisan02',
'doncilu01'
];
Query Time: 0.03 seconds
Table Build Time: 0.03 seconds
--------------------------------------
h2h_sum
Page Setup Time: 0.00112 seconds
WITH
pgames AS (
SELECT person_id, game_id, team_id, year_id
FROM sup_team_games
JOIN sup_player_games USING (game_id, team_id)
JOIN sup_phase_seasons USING (year_id, comp_id, phase_id)
WHERE 1
),
pgames_list AS (
SELECT p1.game_id
FROM (SELECT game_id, team_id
FROM pgames
WHERE person_id=? ) as p1
JOIN (SELECT game_id, team_id FROM pgames WHERE person_id=? ) as p2 ON p1.game_id=p2.game_id AND p1.team_id!=p2.team_id
)
SELECT person_id, COUNT(*) AS games, SUM(is_starter) AS games_started, SUM(mp) AS mp, SUM(fg) AS fg, SUM(fga) AS fga, IF(SUM(fga), SUM((fga IS NOT NULL) * fg) / SUM(fga), NULL) as fg_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM((fga IS NOT NULL) * fg) / SUM(fga), NULL),3)) AS fg_pct, SUM(fg - IFNULL(fg3, 0)) AS fg2, SUM(fga - IFNULL(fg3a, 0)) AS fg2a, IF(SUM(fga - IFNULL(fg3a, 0)), SUM(((fga - IFNULL(fg3a, 0)) IS NOT NULL) * (fg - IFNULL(fg3, 0))) / SUM(fga - IFNULL(fg3a, 0)), NULL) as fg2_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga - IFNULL(fg3a, 0)), SUM(((fga - IFNULL(fg3a, 0)) IS NOT NULL) * (fg - IFNULL(fg3, 0))) / SUM(fga - IFNULL(fg3a, 0)), NULL),3)) AS fg2_pct, SUM(fg3) AS fg3, SUM(fg3a) AS fg3a, IF(SUM(fg3a), SUM((fg3a IS NOT NULL) * fg3) / SUM(fg3a), NULL) as fg3_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM((fg3a IS NOT NULL) * fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL) as efg_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL),3)) AS efg_pct, SUM(ft) AS ft, SUM(fta) AS fta, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(SUM(fga + fta), SUM((fga IS NOT NULL AND fta IS NOT NULL) * pts) / SUM(2 * (fga + (0.44 * fta))), NULL) as ts_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga + fta), SUM((fga IS NOT NULL AND fta IS NOT NULL) * pts) / SUM(2 * (fga + (0.44 * fta))), NULL),3)) AS ts_pct, SUM(orb) AS orb, SUM(trb - orb) AS drb, SUM(trb) AS trb, SUM(ast) AS ast, SUM(stl) AS stl, SUM(blk) AS blk, SUM(tov) AS tov, SUM(pf) AS pf, SUM(pts) AS pts
FROM sup_player_games as st
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral FROM sup_team_games) as tg USING (game_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN (SELECT team_id, year_id, name_abbr, name, link FROM sup_team_seasons GROUP BY team_id, year_id ) as ts USING (team_id, year_id)
JOIN sup_games USING (game_id)
JOIN pgames_list USING (game_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
GROUP BY person_id LIMIT 0, 200
SQL PARAMS -- $VAR1 = [
'doncilu01',
'davisan02',
'davisan02',
'doncilu01'
];
Query Time: 0.05 seconds
WITH
pgames AS (
SELECT person_id, game_id, team_id, year_id
FROM sup_team_games
JOIN sup_player_games USING (game_id, team_id)
JOIN sup_phase_seasons USING (year_id, comp_id, phase_id)
WHERE 1
),
pgames_list AS (
SELECT p1.game_id
FROM (SELECT game_id, team_id
FROM pgames
WHERE person_id=? ) as p1
JOIN (SELECT game_id, team_id FROM pgames WHERE person_id=? ) as p2 ON p1.game_id=p2.game_id AND p1.team_id!=p2.team_id
)
SELECT person_id, COUNT(*) AS games, SUM(is_starter) AS games_started, SUM(mp) AS mp, SUM(fg) AS fg, SUM(fga) AS fga, IF(SUM(fga), SUM((fga IS NOT NULL) * fg) / SUM(fga), NULL) as fg_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM((fga IS NOT NULL) * fg) / SUM(fga), NULL),3)) AS fg_pct, SUM(fg - IFNULL(fg3, 0)) AS fg2, SUM(fga - IFNULL(fg3a, 0)) AS fg2a, IF(SUM(fga - IFNULL(fg3a, 0)), SUM(((fga - IFNULL(fg3a, 0)) IS NOT NULL) * (fg - IFNULL(fg3, 0))) / SUM(fga - IFNULL(fg3a, 0)), NULL) as fg2_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga - IFNULL(fg3a, 0)), SUM(((fga - IFNULL(fg3a, 0)) IS NOT NULL) * (fg - IFNULL(fg3, 0))) / SUM(fga - IFNULL(fg3a, 0)), NULL),3)) AS fg2_pct, SUM(fg3) AS fg3, SUM(fg3a) AS fg3a, IF(SUM(fg3a), SUM((fg3a IS NOT NULL) * fg3) / SUM(fg3a), NULL) as fg3_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM((fg3a IS NOT NULL) * fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL) as efg_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL),3)) AS efg_pct, SUM(ft) AS ft, SUM(fta) AS fta, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(SUM(fga + fta), SUM((fga IS NOT NULL AND fta IS NOT NULL) * pts) / SUM(2 * (fga + (0.44 * fta))), NULL) as ts_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga + fta), SUM((fga IS NOT NULL AND fta IS NOT NULL) * pts) / SUM(2 * (fga + (0.44 * fta))), NULL),3)) AS ts_pct, SUM(orb) AS orb, SUM(trb - orb) AS drb, SUM(trb) AS trb, SUM(ast) AS ast, SUM(stl) AS stl, SUM(blk) AS blk, SUM(tov) AS tov, SUM(pf) AS pf, SUM(pts) AS pts
FROM sup_player_games as st
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral FROM sup_team_games) as tg USING (game_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN (SELECT team_id, year_id, name_abbr, name, link FROM sup_team_seasons GROUP BY team_id, year_id ) as ts USING (team_id, year_id)
JOIN sup_games USING (game_id)
JOIN pgames_list USING (game_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="post"
GROUP BY person_id LIMIT 0, 200
SQL PARAMS -- $VAR1 = [
'doncilu01',
'davisan02',
'davisan02',
'doncilu01'
];
Query Time: 0.02 seconds
Table Build Time: 0.03 seconds
--------------------------------------
h2h_gamelogs
Page Setup Time: 0.00131 seconds
WITH
pgames AS (
SELECT person_id, game_id, team_id, year_id
FROM sup_team_games
JOIN sup_player_games USING (game_id, team_id)
JOIN sup_phase_seasons USING (year_id, comp_id, phase_id)
WHERE 1
),
pgames_list AS (
SELECT p1.game_id
FROM (SELECT game_id, team_id
FROM pgames
WHERE person_id=? ) as p1
JOIN (SELECT game_id, team_id FROM pgames WHERE person_id=? ) as p2 ON p1.game_id=p2.game_id AND p1.team_id!=p2.team_id
)
SELECT person_id, ts.name_abbr as team_name_abbr, ts.link as team_link, game_id, date, sup_games.link as game_link, is_starter as is_starter_csk, IF(is_starter,'*','') AS is_starter, mp, fg, fga, IF(fga, fg / fga, NULL) as fg_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(fga, fg / fga, NULL),3)) AS fg_pct, (fg - IFNULL(fg3, 0)) AS fg2, (fga - IFNULL(fg3a, 0)) AS fg2a, (fg - IFNULL(fg3, 0)) / (fga - IFNULL(fg3a, 0)) as fg2_pct_csk, TRIM(LEADING '0' FROM ROUND((fg - IFNULL(fg3, 0)) / (fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, fg3, fg3a, IF(fg3a, fg3 / fg3a, NULL) as fg3_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(fg3a, fg3 / fg3a, NULL),3)) AS fg3_pct, ft, fta, IF(fta, ft / fta, NULL) as ft_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(fta, ft / fta, NULL),3)) AS ft_pct, IF(fga + fta, pts / (2 * (fga + 0.44 * fta)), NULL) as ts_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(fga + fta, pts / (2 * (fga + 0.44 * fta)), NULL),3)) AS ts_pct, orb, trb - orb AS drb, trb, ast, stl, blk, tov, pf, pts, pts + 0.4 * fg - 0.7 * fga - 0.4 * (fta - ft) + 0.7 * orb + 0.3 * (trb - orb) + stl + 0.7 * ast + 0.7 * blk - 0.4 * pf - tov as game_score_csk, ROUND(pts + 0.4 * fg - 0.7 * fga - 0.4 * (fta - ft) + 0.7 * orb + 0.3 * (trb - orb) + stl + 0.7 * ast + 0.7 * blk - 0.4 * pf - tov,1) AS game_score, bpm as bpm_csk, ROUND(bpm,1) AS bpm, plus_minus
FROM sup_player_games as st
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral FROM sup_team_games) as tg USING (game_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN (SELECT team_id, year_id, name_abbr, name, link FROM sup_team_seasons GROUP BY team_id, year_id ) as ts USING (team_id, year_id)
JOIN sup_games USING (game_id)
JOIN pgames_list USING (game_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
ORDER BY date DESC, person_id LIMIT 0, 20
SQL PARAMS -- $VAR1 = [
'doncilu01',
'davisan02',
'davisan02',
'doncilu01'
];
Query Time: 0.04 seconds
WITH
pgames AS (
SELECT person_id, game_id, team_id, year_id
FROM sup_team_games
JOIN sup_player_games USING (game_id, team_id)
JOIN sup_phase_seasons USING (year_id, comp_id, phase_id)
WHERE 1
),
pgames_list AS (
SELECT p1.game_id
FROM (SELECT game_id, team_id
FROM pgames
WHERE person_id=? ) as p1
JOIN (SELECT game_id, team_id FROM pgames WHERE person_id=? ) as p2 ON p1.game_id=p2.game_id AND p1.team_id!=p2.team_id
)
SELECT person_id, ts.name_abbr as team_name_abbr, ts.link as team_link, game_id, date, sup_games.link as game_link, is_starter as is_starter_csk, IF(is_starter,'*','') AS is_starter, mp, fg, fga, IF(fga, fg / fga, NULL) as fg_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(fga, fg / fga, NULL),3)) AS fg_pct, (fg - IFNULL(fg3, 0)) AS fg2, (fga - IFNULL(fg3a, 0)) AS fg2a, (fg - IFNULL(fg3, 0)) / (fga - IFNULL(fg3a, 0)) as fg2_pct_csk, TRIM(LEADING '0' FROM ROUND((fg - IFNULL(fg3, 0)) / (fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, fg3, fg3a, IF(fg3a, fg3 / fg3a, NULL) as fg3_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(fg3a, fg3 / fg3a, NULL),3)) AS fg3_pct, ft, fta, IF(fta, ft / fta, NULL) as ft_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(fta, ft / fta, NULL),3)) AS ft_pct, IF(fga + fta, pts / (2 * (fga + 0.44 * fta)), NULL) as ts_pct_csk, TRIM(LEADING '0' FROM ROUND(IF(fga + fta, pts / (2 * (fga + 0.44 * fta)), NULL),3)) AS ts_pct, orb, trb - orb AS drb, trb, ast, stl, blk, tov, pf, pts, pts + 0.4 * fg - 0.7 * fga - 0.4 * (fta - ft) + 0.7 * orb + 0.3 * (trb - orb) + stl + 0.7 * ast + 0.7 * blk - 0.4 * pf - tov as game_score_csk, ROUND(pts + 0.4 * fg - 0.7 * fga - 0.4 * (fta - ft) + 0.7 * orb + 0.3 * (trb - orb) + stl + 0.7 * ast + 0.7 * blk - 0.4 * pf - tov,1) AS game_score, bpm as bpm_csk, ROUND(bpm,1) AS bpm, plus_minus
FROM sup_player_games as st
JOIN (SELECT game_id, year_id, comp_id, phase_id, team_id, opp_team_id, opp_comp_id, opp_phase_id, team_game_num_season, home_away_neutral FROM sup_team_games) as tg USING (game_id, team_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN (SELECT team_id, year_id, name_abbr, name, link FROM sup_team_seasons GROUP BY team_id, year_id ) as ts USING (team_id, year_id)
JOIN sup_games USING (game_id)
JOIN pgames_list USING (game_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="post"
ORDER BY date DESC, person_id LIMIT 0, 20
SQL PARAMS -- $VAR1 = [
'doncilu01',
'davisan02',
'davisan02',
'doncilu01'
];
Query Time: 0.02 seconds
Table Build Time: 0.05 seconds
--------------------------------------
player_pg
Page Setup Time: 0.00472 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, SUM(games IS NULL) as games_incomplete, SUM(games) AS games, SUM(games_started IS NULL) as games_started_incomplete, SUM(games_started) AS games_started, (SUM(mp))/(SUM(games*(mp IS NOT NULL))) as mp_per_g_csk, SUM(mp IS NULL) as mp_per_g_incomplete, ROUND((SUM(mp))/(SUM(games*(mp IS NOT NULL))),1) AS mp_per_g, (SUM(fg))/(SUM(games)) as fg_per_g_csk, SUM(fg IS NULL) as fg_per_g_incomplete, ROUND((SUM(fg))/(SUM(games)),1) AS fg_per_g, (SUM(fga))/(SUM(games)) as fga_per_g_csk, SUM(fga IS NULL) as fga_per_g_incomplete, ROUND((SUM(fga))/(SUM(games)),1) AS fga_per_g, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, SUM(fga IS NULL)+SUM(fg IS NULL) as fg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, (SUM(fg)/(SUM(games)) - IFNULL(SUM(fg3 * (fg IS NOT NULL))/SUM(games*(fg IS NOT NULL)), 0)) as fg2_per_g_csk, NULL as fg2_per_g_incomplete, ROUND((SUM(fg)/(SUM(games)) - IFNULL(SUM(fg3 * (fg IS NOT NULL))/SUM(games*(fg IS NOT NULL)), 0)),1) AS fg2_per_g, (SUM(fga)/(SUM(games)) - IFNULL(SUM(fg3a * (fga IS NOT NULL))/SUM(games*(fga IS NOT NULL)), 0)) as fg2a_per_g_csk, NULL as fg2a_per_g_incomplete, ROUND((SUM(fga)/(SUM(games)) - IFNULL(SUM(fg3a * (fga IS NOT NULL))/SUM(games*(fga IS NOT NULL)), 0)),1) AS fg2a_per_g, SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)) as fg2_pct_csk, NULL as fg2_pct_incomplete, TRIM(LEADING '0' FROM ROUND(SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, (SUM(fg3))/(SUM(games*(fg3 IS NOT NULL))) as fg3_per_g_csk, NULL as fg3_per_g_incomplete, ROUND((SUM(fg3))/(SUM(games*(fg3 IS NOT NULL))),1) AS fg3_per_g, (SUM(fg3a))/(SUM(games*(fg3a IS NOT NULL))) as fg3a_per_g_csk, NULL as fg3a_per_g_incomplete, ROUND((SUM(fg3a))/(SUM(games*(fg3a IS NOT NULL))),1) AS fg3a_per_g, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, NULL as fg3_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL) as efg_pct_csk, NULL as efg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL),3)) AS efg_pct, (SUM(ft))/(SUM(games)) as ft_per_g_csk, SUM(ft IS NULL) as ft_per_g_incomplete, ROUND((SUM(ft))/(SUM(games)),1) AS ft_per_g, (SUM(fta))/(SUM(games*(fta IS NOT NULL))) as fta_per_g_csk, SUM(fta IS NULL) as fta_per_g_incomplete, ROUND((SUM(fta))/(SUM(games*(fta IS NOT NULL))),1) AS fta_per_g, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, SUM(fta IS NULL)+SUM(ft IS NULL) as ft_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, (SUM(orb))/(SUM(games*(orb IS NOT NULL))) as orb_per_g_csk, SUM(orb IS NULL) as orb_per_g_incomplete, ROUND((SUM(orb))/(SUM(games*(orb IS NOT NULL))),1) AS orb_per_g, (SUM(trb * (orb IS NOT NULL))/SUM(games*(orb IS NOT NULL)) - SUM(orb * (orb IS NOT NULL))/SUM(games*(orb IS NOT NULL))) as drb_per_g_csk, SUM(trb IS NULL)+SUM(orb IS NULL) as drb_per_g_incomplete, ROUND((SUM(trb * (orb IS NOT NULL))/SUM(games*(orb IS NOT NULL)) - SUM(orb * (orb IS NOT NULL))/SUM(games*(orb IS NOT NULL))),1) AS drb_per_g, (SUM(trb))/(SUM(games*(trb IS NOT NULL))) as trb_per_g_csk, SUM(trb IS NULL) as trb_per_g_incomplete, ROUND((SUM(trb))/(SUM(games*(trb IS NOT NULL))),1) AS trb_per_g, (SUM(ast))/(SUM(games*(ast IS NOT NULL))) as ast_per_g_csk, SUM(ast IS NULL) as ast_per_g_incomplete, ROUND((SUM(ast))/(SUM(games*(ast IS NOT NULL))),1) AS ast_per_g, (SUM(stl))/(SUM(games*(stl IS NOT NULL))) as stl_per_g_csk, SUM(stl IS NULL) as stl_per_g_incomplete, ROUND((SUM(stl))/(SUM(games*(stl IS NOT NULL))),1) AS stl_per_g, (SUM(blk))/(SUM(games*(blk IS NOT NULL))) as blk_per_g_csk, SUM(blk IS NULL) as blk_per_g_incomplete, ROUND((SUM(blk))/(SUM(games*(blk IS NOT NULL))),1) AS blk_per_g, (SUM(tov))/(SUM(games*(tov IS NOT NULL))) as tov_per_g_csk, SUM(tov IS NULL) as tov_per_g_incomplete, ROUND((SUM(tov))/(SUM(games*(tov IS NOT NULL))),1) AS tov_per_g, (SUM(pf))/(SUM(games*(pf IS NOT NULL))) as pf_per_g_csk, SUM(pf IS NULL) as pf_per_g_incomplete, ROUND((SUM(pf))/(SUM(games*(pf IS NOT NULL))),1) AS pf_per_g, (SUM(pts))/(SUM(games)) as pts_per_g_csk, SUM(pts IS NULL) as pts_per_g_incomplete, ROUND((SUM(pts))/(SUM(games)),1) AS pts_per_g
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.01 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, SUM(games IS NULL) as games_incomplete, SUM(games) AS games, SUM(games_started IS NULL) as games_started_incomplete, SUM(games_started) AS games_started, (SUM(mp))/(SUM(games*(mp IS NOT NULL))) as mp_per_g_csk, SUM(mp IS NULL) as mp_per_g_incomplete, ROUND((SUM(mp))/(SUM(games*(mp IS NOT NULL))),1) AS mp_per_g, (SUM(fg))/(SUM(games)) as fg_per_g_csk, SUM(fg IS NULL) as fg_per_g_incomplete, ROUND((SUM(fg))/(SUM(games)),1) AS fg_per_g, (SUM(fga))/(SUM(games)) as fga_per_g_csk, SUM(fga IS NULL) as fga_per_g_incomplete, ROUND((SUM(fga))/(SUM(games)),1) AS fga_per_g, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, SUM(fga IS NULL)+SUM(fg IS NULL) as fg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, (SUM(fg)/(SUM(games)) - IFNULL(SUM(fg3 * (fg IS NOT NULL))/SUM(games*(fg IS NOT NULL)), 0)) as fg2_per_g_csk, NULL as fg2_per_g_incomplete, ROUND((SUM(fg)/(SUM(games)) - IFNULL(SUM(fg3 * (fg IS NOT NULL))/SUM(games*(fg IS NOT NULL)), 0)),1) AS fg2_per_g, (SUM(fga)/(SUM(games)) - IFNULL(SUM(fg3a * (fga IS NOT NULL))/SUM(games*(fga IS NOT NULL)), 0)) as fg2a_per_g_csk, NULL as fg2a_per_g_incomplete, ROUND((SUM(fga)/(SUM(games)) - IFNULL(SUM(fg3a * (fga IS NOT NULL))/SUM(games*(fga IS NOT NULL)), 0)),1) AS fg2a_per_g, SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)) as fg2_pct_csk, NULL as fg2_pct_incomplete, TRIM(LEADING '0' FROM ROUND(SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, (SUM(fg3))/(SUM(games*(fg3 IS NOT NULL))) as fg3_per_g_csk, NULL as fg3_per_g_incomplete, ROUND((SUM(fg3))/(SUM(games*(fg3 IS NOT NULL))),1) AS fg3_per_g, (SUM(fg3a))/(SUM(games*(fg3a IS NOT NULL))) as fg3a_per_g_csk, NULL as fg3a_per_g_incomplete, ROUND((SUM(fg3a))/(SUM(games*(fg3a IS NOT NULL))),1) AS fg3a_per_g, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, NULL as fg3_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL) as efg_pct_csk, NULL as efg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL),3)) AS efg_pct, (SUM(ft))/(SUM(games)) as ft_per_g_csk, SUM(ft IS NULL) as ft_per_g_incomplete, ROUND((SUM(ft))/(SUM(games)),1) AS ft_per_g, (SUM(fta))/(SUM(games*(fta IS NOT NULL))) as fta_per_g_csk, SUM(fta IS NULL) as fta_per_g_incomplete, ROUND((SUM(fta))/(SUM(games*(fta IS NOT NULL))),1) AS fta_per_g, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, SUM(fta IS NULL)+SUM(ft IS NULL) as ft_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, (SUM(orb))/(SUM(games*(orb IS NOT NULL))) as orb_per_g_csk, SUM(orb IS NULL) as orb_per_g_incomplete, ROUND((SUM(orb))/(SUM(games*(orb IS NOT NULL))),1) AS orb_per_g, (SUM(trb * (orb IS NOT NULL))/SUM(games*(orb IS NOT NULL)) - SUM(orb * (orb IS NOT NULL))/SUM(games*(orb IS NOT NULL))) as drb_per_g_csk, SUM(trb IS NULL)+SUM(orb IS NULL) as drb_per_g_incomplete, ROUND((SUM(trb * (orb IS NOT NULL))/SUM(games*(orb IS NOT NULL)) - SUM(orb * (orb IS NOT NULL))/SUM(games*(orb IS NOT NULL))),1) AS drb_per_g, (SUM(trb))/(SUM(games*(trb IS NOT NULL))) as trb_per_g_csk, SUM(trb IS NULL) as trb_per_g_incomplete, ROUND((SUM(trb))/(SUM(games*(trb IS NOT NULL))),1) AS trb_per_g, (SUM(ast))/(SUM(games*(ast IS NOT NULL))) as ast_per_g_csk, SUM(ast IS NULL) as ast_per_g_incomplete, ROUND((SUM(ast))/(SUM(games*(ast IS NOT NULL))),1) AS ast_per_g, (SUM(stl))/(SUM(games*(stl IS NOT NULL))) as stl_per_g_csk, SUM(stl IS NULL) as stl_per_g_incomplete, ROUND((SUM(stl))/(SUM(games*(stl IS NOT NULL))),1) AS stl_per_g, (SUM(blk))/(SUM(games*(blk IS NOT NULL))) as blk_per_g_csk, SUM(blk IS NULL) as blk_per_g_incomplete, ROUND((SUM(blk))/(SUM(games*(blk IS NOT NULL))),1) AS blk_per_g, (SUM(tov))/(SUM(games*(tov IS NOT NULL))) as tov_per_g_csk, SUM(tov IS NULL) as tov_per_g_incomplete, ROUND((SUM(tov))/(SUM(games*(tov IS NOT NULL))),1) AS tov_per_g, (SUM(pf))/(SUM(games*(pf IS NOT NULL))) as pf_per_g_csk, SUM(pf IS NULL) as pf_per_g_incomplete, ROUND((SUM(pf))/(SUM(games*(pf IS NOT NULL))),1) AS pf_per_g, (SUM(pts))/(SUM(games)) as pts_per_g_csk, SUM(pts IS NULL) as pts_per_g_incomplete, ROUND((SUM(pts))/(SUM(games)),1) AS pts_per_g
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND phase_id="PST"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.00 seconds
Table Build Time: 0.03 seconds
Table Build Time: 0.03 seconds
--------------------------------------
player_comp
Page Setup Time: 0.00124 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, SUM(games IS NULL) as games_incomplete, SUM(games) AS games, SUM(games_started IS NULL) as games_started_incomplete, SUM(games_started) AS games_started, SUM(mp IS NULL) as mp_incomplete, SUM(mp) AS mp, SUM(fg IS NULL) as fg_incomplete, SUM(fg) AS fg, SUM(fga IS NULL) as fga_incomplete, SUM(fga) AS fga, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, SUM(fga IS NULL)+SUM(fg IS NULL) as fg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, NULL as fg2_incomplete, SUM(fg - IFNULL(fg3, 0)) AS fg2, NULL as fg2a_incomplete, SUM(fga - IFNULL(fg3a, 0)) AS fg2a, SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)) as fg2_pct_csk, NULL as fg2_pct_incomplete, TRIM(LEADING '0' FROM ROUND(SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, NULL as fg3_incomplete, SUM(fg3) AS fg3, NULL as fg3a_incomplete, SUM(fg3a) AS fg3a, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, NULL as fg3_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL) as efg_pct_csk, NULL as efg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL),3)) AS efg_pct, SUM(ft IS NULL) as ft_incomplete, SUM(ft) AS ft, SUM(fta IS NULL) as fta_incomplete, SUM(fta) AS fta, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, SUM(fta IS NULL)+SUM(ft IS NULL) as ft_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(SUM(fga + fta), SUM(pts) / SUM(2 * (fga + 0.44 * fta)), NULL) as ts_pct_csk, SUM(fta IS NULL)+SUM(fga IS NULL)+SUM(pts IS NULL) as ts_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga + fta), SUM(pts) / SUM(2 * (fga + 0.44 * fta)), NULL),3)) AS ts_pct, SUM(orb IS NULL) as orb_incomplete, SUM(orb) AS orb, SUM(orb IS NULL)+SUM(trb IS NULL) as drb_incomplete, SUM(trb - orb) AS drb, SUM(trb IS NULL) as trb_incomplete, SUM(trb) AS trb, SUM(ast IS NULL) as ast_incomplete, SUM(ast) AS ast, SUM(stl IS NULL) as stl_incomplete, SUM(stl) AS stl, SUM(blk IS NULL) as blk_incomplete, SUM(blk) AS blk, SUM(tov IS NULL) as tov_incomplete, SUM(tov) AS tov, SUM(pf IS NULL) as pf_incomplete, SUM(pf) AS pf, SUM(pts IS NULL) as pts_incomplete, SUM(pts) AS pts
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.00 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, SUM(games IS NULL) as games_incomplete, SUM(games) AS games, SUM(games_started IS NULL) as games_started_incomplete, SUM(games_started) AS games_started, SUM(mp IS NULL) as mp_incomplete, SUM(mp) AS mp, SUM(fg IS NULL) as fg_incomplete, SUM(fg) AS fg, SUM(fga IS NULL) as fga_incomplete, SUM(fga) AS fga, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, SUM(fga IS NULL)+SUM(fg IS NULL) as fg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, NULL as fg2_incomplete, SUM(fg - IFNULL(fg3, 0)) AS fg2, NULL as fg2a_incomplete, SUM(fga - IFNULL(fg3a, 0)) AS fg2a, SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)) as fg2_pct_csk, NULL as fg2_pct_incomplete, TRIM(LEADING '0' FROM ROUND(SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, NULL as fg3_incomplete, SUM(fg3) AS fg3, NULL as fg3a_incomplete, SUM(fg3a) AS fg3a, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, NULL as fg3_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL) as efg_pct_csk, NULL as efg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg + 0.5 * IFNULL(fg3, 0)) / SUM(fga), NULL),3)) AS efg_pct, SUM(ft IS NULL) as ft_incomplete, SUM(ft) AS ft, SUM(fta IS NULL) as fta_incomplete, SUM(fta) AS fta, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, SUM(fta IS NULL)+SUM(ft IS NULL) as ft_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(SUM(fga + fta), SUM(pts) / SUM(2 * (fga + 0.44 * fta)), NULL) as ts_pct_csk, SUM(fta IS NULL)+SUM(fga IS NULL)+SUM(pts IS NULL) as ts_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga + fta), SUM(pts) / SUM(2 * (fga + 0.44 * fta)), NULL),3)) AS ts_pct, SUM(orb IS NULL) as orb_incomplete, SUM(orb) AS orb, SUM(orb IS NULL)+SUM(trb IS NULL) as drb_incomplete, SUM(trb - orb) AS drb, SUM(trb IS NULL) as trb_incomplete, SUM(trb) AS trb, SUM(ast IS NULL) as ast_incomplete, SUM(ast) AS ast, SUM(stl IS NULL) as stl_incomplete, SUM(stl) AS stl, SUM(blk IS NULL) as blk_incomplete, SUM(blk) AS blk, SUM(tov IS NULL) as tov_incomplete, SUM(tov) AS tov, SUM(pf IS NULL) as pf_incomplete, SUM(pf) AS pf, SUM(pts IS NULL) as pts_incomplete, SUM(pts) AS pts
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND phase_id="PST"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.00 seconds
Table Build Time: 0.03 seconds
Table Build Time: 0.03 seconds
--------------------------------------
player_p36
Page Setup Time: 0.00542 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, ( (SUM(fg * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg IS NOT NULL))) ) * 36 as fg_per_36_csk, SUM(fg IS NULL) as fg_per_36_incomplete, ROUND(( (SUM(fg * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg IS NOT NULL))) ) * 36,1) AS fg_per_36, ( (SUM(fga * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fga IS NOT NULL))) ) * 36 as fga_per_36_csk, SUM(fga IS NULL) as fga_per_36_incomplete, ROUND(( (SUM(fga * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fga IS NOT NULL))) ) * 36,1) AS fga_per_36, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, SUM(fga IS NULL)+SUM(fg IS NULL) as fg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, ((SUM(fg * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 - IFNULL((SUM(fg3 * (year_id >= 1952) * (fg IS NOT NULL))/SUM(mp*(fg IS NOT NULL)))*36, 0)) as fg2_per_36_csk, NULL as fg2_per_36_incomplete, ROUND(((SUM(fg * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 - IFNULL((SUM(fg3 * (year_id >= 1952) * (fg IS NOT NULL))/SUM(mp*(fg IS NOT NULL)))*36, 0)),1) AS fg2_per_36, ((SUM(fga * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 - IFNULL((SUM(fg3a * (year_id >= 1952) * (fga IS NOT NULL))/SUM(mp*(fga IS NOT NULL)))*36, 0)) as fg2a_per_36_csk, NULL as fg2a_per_36_incomplete, ROUND(((SUM(fga * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 - IFNULL((SUM(fg3a * (year_id >= 1952) * (fga IS NOT NULL))/SUM(mp*(fga IS NOT NULL)))*36, 0)),1) AS fg2a_per_36, SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)) as fg2_pct_csk, NULL as fg2_pct_incomplete, TRIM(LEADING '0' FROM ROUND(SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, ( (SUM(fg3 * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg3 IS NOT NULL))) ) * 36 as fg3_per_36_csk, NULL as fg3_per_36_incomplete, ROUND(( (SUM(fg3 * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg3 IS NOT NULL))) ) * 36,1) AS fg3_per_36, ( (SUM(fg3a * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg3a IS NOT NULL))) ) * 36 as fg3a_per_36_csk, NULL as fg3a_per_36_incomplete, ROUND(( (SUM(fg3a * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg3a IS NOT NULL))) ) * 36,1) AS fg3a_per_36, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, NULL as fg3_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, ( (SUM(ft * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952))) ) * 36 as ft_per_36_csk, SUM(ft IS NULL) as ft_per_36_incomplete, ROUND(( (SUM(ft * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952))) ) * 36,1) AS ft_per_36, ( (SUM(fta * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fta IS NOT NULL))) ) * 36 as fta_per_36_csk, SUM(fta IS NULL) as fta_per_36_incomplete, ROUND(( (SUM(fta * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fta IS NOT NULL))) ) * 36,1) AS fta_per_36, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, SUM(fta IS NULL)+SUM(ft IS NULL) as ft_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(((SUM(fga * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 + (SUM(fta * (year_id >= 1952) * (fta IS NOT NULL))/SUM(mp*(fta IS NOT NULL)))*36), ((SUM(pts * (year_id >= 1952) * (fta IS NOT NULL))/SUM(mp))*36) / (2 * ((SUM(fga)/(SUM(mp)))*36 + 0.44 * (SUM(fta * (fta IS NOT NULL))/SUM(mp*(fta IS NOT NULL)))*36)), NULL) as ts_pct_per_36_csk, SUM(fga IS NULL)+SUM(fta IS NULL)+SUM(pts IS NULL) as ts_pct_per_36_incomplete, TRIM(LEADING '0' FROM ROUND(IF(((SUM(fga * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 + (SUM(fta * (year_id >= 1952) * (fta IS NOT NULL))/SUM(mp*(fta IS NOT NULL)))*36), ((SUM(pts * (year_id >= 1952) * (fta IS NOT NULL))/SUM(mp))*36) / (2 * ((SUM(fga)/(SUM(mp)))*36 + 0.44 * (SUM(fta * (fta IS NOT NULL))/SUM(mp*(fta IS NOT NULL)))*36)), NULL),1)) AS ts_pct_per_36, ( (SUM(orb * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(orb IS NOT NULL))) ) * 36 as orb_per_36_csk, SUM(orb IS NULL) as orb_per_36_incomplete, ROUND(( (SUM(orb * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(orb IS NOT NULL))) ) * 36,1) AS orb_per_36, ((SUM(trb * (year_id >= 1952) * (orb * (year_id >= 1952) IS NOT NULL))/SUM(mp * (year_id >= 1952)*(orb IS NOT NULL)))*36 - (SUM(orb * (orb IS NOT NULL))/SUM(mp*(orb IS NOT NULL)))*36) as drb_per_36_csk, SUM(orb IS NULL)+SUM(trb IS NULL) as drb_per_36_incomplete, ROUND(((SUM(trb * (year_id >= 1952) * (orb * (year_id >= 1952) IS NOT NULL))/SUM(mp * (year_id >= 1952)*(orb IS NOT NULL)))*36 - (SUM(orb * (orb IS NOT NULL))/SUM(mp*(orb IS NOT NULL)))*36),1) AS drb_per_36, ( (SUM(trb * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(trb IS NOT NULL))) ) * 36 as trb_per_36_csk, SUM(trb IS NULL) as trb_per_36_incomplete, ROUND(( (SUM(trb * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(trb IS NOT NULL))) ) * 36,1) AS trb_per_36, ( (SUM(ast * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(ast IS NOT NULL))) ) * 36 as ast_per_36_csk, SUM(ast IS NULL) as ast_per_36_incomplete, ROUND(( (SUM(ast * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(ast IS NOT NULL))) ) * 36,1) AS ast_per_36, ( (SUM(stl * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(stl IS NOT NULL))) ) * 36 as stl_per_36_csk, SUM(stl IS NULL) as stl_per_36_incomplete, ROUND(( (SUM(stl * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(stl IS NOT NULL))) ) * 36,1) AS stl_per_36, ( (SUM(blk * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(blk IS NOT NULL))) ) * 36 as blk_per_36_csk, SUM(blk IS NULL) as blk_per_36_incomplete, ROUND(( (SUM(blk * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(blk IS NOT NULL))) ) * 36,1) AS blk_per_36, ( (SUM(tov * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(tov IS NOT NULL))) ) * 36 as tov_per_36_csk, SUM(tov IS NULL) as tov_per_36_incomplete, ROUND(( (SUM(tov * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(tov IS NOT NULL))) ) * 36,1) AS tov_per_36, ( (SUM(pf * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(pf IS NOT NULL))) ) * 36 as pf_per_36_csk, SUM(pf IS NULL) as pf_per_36_incomplete, ROUND(( (SUM(pf * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(pf IS NOT NULL))) ) * 36,1) AS pf_per_36, ( (SUM(pts * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952))) ) * 36 as pts_per_36_csk, SUM(pts IS NULL) as pts_per_36_incomplete, ROUND(( (SUM(pts * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952))) ) * 36,1) AS pts_per_36, SUM(mp IS NULL) as mp_incomplete, SUM(mp) AS mp
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.01 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, ( (SUM(fg * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg IS NOT NULL))) ) * 36 as fg_per_36_csk, SUM(fg IS NULL) as fg_per_36_incomplete, ROUND(( (SUM(fg * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg IS NOT NULL))) ) * 36,1) AS fg_per_36, ( (SUM(fga * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fga IS NOT NULL))) ) * 36 as fga_per_36_csk, SUM(fga IS NULL) as fga_per_36_incomplete, ROUND(( (SUM(fga * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fga IS NOT NULL))) ) * 36,1) AS fga_per_36, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, SUM(fga IS NULL)+SUM(fg IS NULL) as fg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, ((SUM(fg * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 - IFNULL((SUM(fg3 * (year_id >= 1952) * (fg IS NOT NULL))/SUM(mp*(fg IS NOT NULL)))*36, 0)) as fg2_per_36_csk, NULL as fg2_per_36_incomplete, ROUND(((SUM(fg * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 - IFNULL((SUM(fg3 * (year_id >= 1952) * (fg IS NOT NULL))/SUM(mp*(fg IS NOT NULL)))*36, 0)),1) AS fg2_per_36, ((SUM(fga * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 - IFNULL((SUM(fg3a * (year_id >= 1952) * (fga IS NOT NULL))/SUM(mp*(fga IS NOT NULL)))*36, 0)) as fg2a_per_36_csk, NULL as fg2a_per_36_incomplete, ROUND(((SUM(fga * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 - IFNULL((SUM(fg3a * (year_id >= 1952) * (fga IS NOT NULL))/SUM(mp*(fga IS NOT NULL)))*36, 0)),1) AS fg2a_per_36, SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)) as fg2_pct_csk, NULL as fg2_pct_incomplete, TRIM(LEADING '0' FROM ROUND(SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, ( (SUM(fg3 * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg3 IS NOT NULL))) ) * 36 as fg3_per_36_csk, NULL as fg3_per_36_incomplete, ROUND(( (SUM(fg3 * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg3 IS NOT NULL))) ) * 36,1) AS fg3_per_36, ( (SUM(fg3a * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg3a IS NOT NULL))) ) * 36 as fg3a_per_36_csk, NULL as fg3a_per_36_incomplete, ROUND(( (SUM(fg3a * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fg3a IS NOT NULL))) ) * 36,1) AS fg3a_per_36, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, NULL as fg3_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, ( (SUM(ft * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952))) ) * 36 as ft_per_36_csk, SUM(ft IS NULL) as ft_per_36_incomplete, ROUND(( (SUM(ft * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952))) ) * 36,1) AS ft_per_36, ( (SUM(fta * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fta IS NOT NULL))) ) * 36 as fta_per_36_csk, SUM(fta IS NULL) as fta_per_36_incomplete, ROUND(( (SUM(fta * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(fta IS NOT NULL))) ) * 36,1) AS fta_per_36, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, SUM(fta IS NULL)+SUM(ft IS NULL) as ft_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(((SUM(fga * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 + (SUM(fta * (year_id >= 1952) * (fta IS NOT NULL))/SUM(mp*(fta IS NOT NULL)))*36), ((SUM(pts * (year_id >= 1952) * (fta IS NOT NULL))/SUM(mp))*36) / (2 * ((SUM(fga)/(SUM(mp)))*36 + 0.44 * (SUM(fta * (fta IS NOT NULL))/SUM(mp*(fta IS NOT NULL)))*36)), NULL) as ts_pct_per_36_csk, SUM(fga IS NULL)+SUM(fta IS NULL)+SUM(pts IS NULL) as ts_pct_per_36_incomplete, TRIM(LEADING '0' FROM ROUND(IF(((SUM(fga * (year_id >= 1952))/(SUM(mp * (year_id >= 1952))))*36 + (SUM(fta * (year_id >= 1952) * (fta IS NOT NULL))/SUM(mp*(fta IS NOT NULL)))*36), ((SUM(pts * (year_id >= 1952) * (fta IS NOT NULL))/SUM(mp))*36) / (2 * ((SUM(fga)/(SUM(mp)))*36 + 0.44 * (SUM(fta * (fta IS NOT NULL))/SUM(mp*(fta IS NOT NULL)))*36)), NULL),1)) AS ts_pct_per_36, ( (SUM(orb * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(orb IS NOT NULL))) ) * 36 as orb_per_36_csk, SUM(orb IS NULL) as orb_per_36_incomplete, ROUND(( (SUM(orb * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(orb IS NOT NULL))) ) * 36,1) AS orb_per_36, ((SUM(trb * (year_id >= 1952) * (orb * (year_id >= 1952) IS NOT NULL))/SUM(mp * (year_id >= 1952)*(orb IS NOT NULL)))*36 - (SUM(orb * (orb IS NOT NULL))/SUM(mp*(orb IS NOT NULL)))*36) as drb_per_36_csk, SUM(orb IS NULL)+SUM(trb IS NULL) as drb_per_36_incomplete, ROUND(((SUM(trb * (year_id >= 1952) * (orb * (year_id >= 1952) IS NOT NULL))/SUM(mp * (year_id >= 1952)*(orb IS NOT NULL)))*36 - (SUM(orb * (orb IS NOT NULL))/SUM(mp*(orb IS NOT NULL)))*36),1) AS drb_per_36, ( (SUM(trb * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(trb IS NOT NULL))) ) * 36 as trb_per_36_csk, SUM(trb IS NULL) as trb_per_36_incomplete, ROUND(( (SUM(trb * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(trb IS NOT NULL))) ) * 36,1) AS trb_per_36, ( (SUM(ast * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(ast IS NOT NULL))) ) * 36 as ast_per_36_csk, SUM(ast IS NULL) as ast_per_36_incomplete, ROUND(( (SUM(ast * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(ast IS NOT NULL))) ) * 36,1) AS ast_per_36, ( (SUM(stl * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(stl IS NOT NULL))) ) * 36 as stl_per_36_csk, SUM(stl IS NULL) as stl_per_36_incomplete, ROUND(( (SUM(stl * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(stl IS NOT NULL))) ) * 36,1) AS stl_per_36, ( (SUM(blk * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(blk IS NOT NULL))) ) * 36 as blk_per_36_csk, SUM(blk IS NULL) as blk_per_36_incomplete, ROUND(( (SUM(blk * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(blk IS NOT NULL))) ) * 36,1) AS blk_per_36, ( (SUM(tov * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(tov IS NOT NULL))) ) * 36 as tov_per_36_csk, SUM(tov IS NULL) as tov_per_36_incomplete, ROUND(( (SUM(tov * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(tov IS NOT NULL))) ) * 36,1) AS tov_per_36, ( (SUM(pf * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(pf IS NOT NULL))) ) * 36 as pf_per_36_csk, SUM(pf IS NULL) as pf_per_36_incomplete, ROUND(( (SUM(pf * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952)*(pf IS NOT NULL))) ) * 36,1) AS pf_per_36, ( (SUM(pts * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952))) ) * 36 as pts_per_36_csk, SUM(pts IS NULL) as pts_per_36_incomplete, ROUND(( (SUM(pts * (year_id >= 1952)))/(SUM(mp * (year_id >= 1952))) ) * 36,1) AS pts_per_36, SUM(mp IS NULL) as mp_incomplete, SUM(mp) AS mp
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND phase_id="PST"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.01 seconds
Table Build Time: 0.03 seconds
Table Build Time: 0.03 seconds
--------------------------------------
player_p100
Page Setup Time: 0.00579 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, ( (SUM(fg * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg IS NOT NULL))) ) * 100 as fg_per_100_csk, SUM(fg IS NULL) as fg_per_100_incomplete, ROUND(( (SUM(fg * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg IS NOT NULL))) ) * 100,1) AS fg_per_100, ( (SUM(fga * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974))) ) * 100 as fga_per_100_csk, SUM(fga IS NULL) as fga_per_100_incomplete, ROUND(( (SUM(fga * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974))) ) * 100,1) AS fga_per_100, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, SUM(fga IS NULL)+SUM(fg IS NULL) as fg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, ((SUM(fg * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 - IFNULL((SUM(fg3 * (year_id >= 1974) * (fg IS NOT NULL))/SUM(team_poss*(fg IS NOT NULL)))*100, 0)) as fg2_per_100_csk, NULL as fg2_per_100_incomplete, ROUND(((SUM(fg * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 - IFNULL((SUM(fg3 * (year_id >= 1974) * (fg IS NOT NULL))/SUM(team_poss*(fg IS NOT NULL)))*100, 0)),1) AS fg2_per_100, ((SUM(fga * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 - IFNULL((SUM(fg3a * (year_id >= 1974) * (fga IS NOT NULL))/SUM(team_poss*(fga IS NOT NULL)))*100, 0)) as fg2a_per_100_csk, NULL as fg2a_per_100_incomplete, ROUND(((SUM(fga * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 - IFNULL((SUM(fg3a * (year_id >= 1974) * (fga IS NOT NULL))/SUM(team_poss*(fga IS NOT NULL)))*100, 0)),1) AS fg2a_per_100, SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)) as fg2_pct_csk, NULL as fg2_pct_incomplete, TRIM(LEADING '0' FROM ROUND(SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, ( (SUM(fg3 * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg3 IS NOT NULL))) ) * 100 as fg3_per_100_csk, NULL as fg3_per_100_incomplete, ROUND(( (SUM(fg3 * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg3 IS NOT NULL))) ) * 100,1) AS fg3_per_100, ( (SUM(fg3a * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg3a IS NOT NULL))) ) * 100 as fg3a_per_100_csk, NULL as fg3a_per_100_incomplete, ROUND(( (SUM(fg3a * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg3a IS NOT NULL))) ) * 100,1) AS fg3a_per_100, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, NULL as fg3_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, ( (SUM(ft * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974))) ) * 100 as ft_per_100_csk, SUM(ft IS NULL) as ft_per_100_incomplete, ROUND(( (SUM(ft * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974))) ) * 100,1) AS ft_per_100, ( (SUM(fta * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fta IS NOT NULL))) ) * 100 as fta_per_100_csk, SUM(fta IS NULL) as fta_per_100_incomplete, ROUND(( (SUM(fta * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fta IS NOT NULL))) ) * 100,1) AS fta_per_100, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, SUM(fta IS NULL)+SUM(ft IS NULL) as ft_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(((SUM(fga * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 + (SUM(fta * (year_id >= 1974) * (fta IS NOT NULL))/SUM(team_poss*(fta IS NOT NULL)))*100), ((SUM(pts * (year_id >= 1974) * (fta IS NOT NULL))/SUM(team_poss))*100) / (2 * ((SUM(fga)/(SUM(team_poss)))*100 + 0.44 * (SUM(fta * (fta IS NOT NULL))/SUM(team_poss*(fta IS NOT NULL)))*100)), NULL) as ts_pct_per_100_csk, SUM(fga IS NULL)+SUM(fta IS NULL)+SUM(pts IS NULL) as ts_pct_per_100_incomplete, TRIM(LEADING '0' FROM ROUND(IF(((SUM(fga * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 + (SUM(fta * (year_id >= 1974) * (fta IS NOT NULL))/SUM(team_poss*(fta IS NOT NULL)))*100), ((SUM(pts * (year_id >= 1974) * (fta IS NOT NULL))/SUM(team_poss))*100) / (2 * ((SUM(fga)/(SUM(team_poss)))*100 + 0.44 * (SUM(fta * (fta IS NOT NULL))/SUM(team_poss*(fta IS NOT NULL)))*100)), NULL),1)) AS ts_pct_per_100, ( (SUM(orb * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(orb IS NOT NULL))) ) * 100 as orb_per_100_csk, SUM(orb IS NULL) as orb_per_100_incomplete, ROUND(( (SUM(orb * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(orb IS NOT NULL))) ) * 100,1) AS orb_per_100, ((SUM(trb * (year_id >= 1974) * (orb * (year_id >= 1974) IS NOT NULL))/SUM(team_poss * (year_id >= 1974)*(orb IS NOT NULL)))*100 - (SUM(orb * (orb IS NOT NULL))/SUM(team_poss*(orb IS NOT NULL)))*100) as drb_per_100_csk, SUM(trb IS NULL)+SUM(orb IS NULL) as drb_per_100_incomplete, ROUND(((SUM(trb * (year_id >= 1974) * (orb * (year_id >= 1974) IS NOT NULL))/SUM(team_poss * (year_id >= 1974)*(orb IS NOT NULL)))*100 - (SUM(orb * (orb IS NOT NULL))/SUM(team_poss*(orb IS NOT NULL)))*100),1) AS drb_per_100, ( (SUM(trb * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(trb IS NOT NULL))) ) * 100 as trb_per_100_csk, SUM(trb IS NULL) as trb_per_100_incomplete, ROUND(( (SUM(trb * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(trb IS NOT NULL))) ) * 100,1) AS trb_per_100, ( (SUM(ast * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(ast IS NOT NULL))) ) * 100 as ast_per_100_csk, SUM(ast IS NULL) as ast_per_100_incomplete, ROUND(( (SUM(ast * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(ast IS NOT NULL))) ) * 100,1) AS ast_per_100, ( (SUM(stl * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(stl IS NOT NULL))) ) * 100 as stl_per_100_csk, SUM(stl IS NULL) as stl_per_100_incomplete, ROUND(( (SUM(stl * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(stl IS NOT NULL))) ) * 100,1) AS stl_per_100, ( (SUM(blk * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(blk IS NOT NULL))) ) * 100 as blk_per_100_csk, SUM(blk IS NULL) as blk_per_100_incomplete, ROUND(( (SUM(blk * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(blk IS NOT NULL))) ) * 100,1) AS blk_per_100, ( (SUM(tov * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(tov IS NOT NULL))) ) * 100 as tov_per_100_csk, SUM(tov IS NULL) as tov_per_100_incomplete, ROUND(( (SUM(tov * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(tov IS NOT NULL))) ) * 100,1) AS tov_per_100, ( (SUM(pf * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(pf IS NOT NULL))) ) * 100 as pf_per_100_csk, SUM(pf IS NULL) as pf_per_100_incomplete, ROUND(( (SUM(pf * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(pf IS NOT NULL))) ) * 100,1) AS pf_per_100, ( (SUM(pts * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(pts IS NOT NULL))) ) * 100 as pts_per_100_csk, SUM(pts IS NULL) as pts_per_100_incomplete, ROUND(( (SUM(pts * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(pts IS NOT NULL))) ) * 100,1) AS pts_per_100, SUM(poss * off_rtg) / SUM((off_rtg IS NOT NULL) * poss) as off_rtg_csk, SUM(poss IS NULL)+SUM(off_rtg IS NULL) as off_rtg_incomplete, ROUND(SUM(poss * off_rtg) / SUM((off_rtg IS NOT NULL) * poss),0) AS off_rtg, SUM(def_poss * def_rtg) / SUM((def_rtg IS NOT NULL) * def_poss) as def_rtg_csk, SUM(def_rtg IS NULL)+SUM(def_poss IS NULL) as def_rtg_incomplete, ROUND(SUM(def_poss * def_rtg) / SUM((def_rtg IS NOT NULL) * def_poss),0) AS def_rtg, SUM(team_poss IS NULL) as team_poss_incomplete, SUM(team_poss) AS team_poss
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.01 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, ( (SUM(fg * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg IS NOT NULL))) ) * 100 as fg_per_100_csk, SUM(fg IS NULL) as fg_per_100_incomplete, ROUND(( (SUM(fg * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg IS NOT NULL))) ) * 100,1) AS fg_per_100, ( (SUM(fga * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974))) ) * 100 as fga_per_100_csk, SUM(fga IS NULL) as fga_per_100_incomplete, ROUND(( (SUM(fga * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974))) ) * 100,1) AS fga_per_100, IF(SUM(fga), SUM(fg) / SUM(fga), NULL) as fg_pct_csk, SUM(fga IS NULL)+SUM(fg IS NULL) as fg_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga), SUM(fg) / SUM(fga), NULL),3)) AS fg_pct, ((SUM(fg * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 - IFNULL((SUM(fg3 * (year_id >= 1974) * (fg IS NOT NULL))/SUM(team_poss*(fg IS NOT NULL)))*100, 0)) as fg2_per_100_csk, NULL as fg2_per_100_incomplete, ROUND(((SUM(fg * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 - IFNULL((SUM(fg3 * (year_id >= 1974) * (fg IS NOT NULL))/SUM(team_poss*(fg IS NOT NULL)))*100, 0)),1) AS fg2_per_100, ((SUM(fga * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 - IFNULL((SUM(fg3a * (year_id >= 1974) * (fga IS NOT NULL))/SUM(team_poss*(fga IS NOT NULL)))*100, 0)) as fg2a_per_100_csk, NULL as fg2a_per_100_incomplete, ROUND(((SUM(fga * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 - IFNULL((SUM(fg3a * (year_id >= 1974) * (fga IS NOT NULL))/SUM(team_poss*(fga IS NOT NULL)))*100, 0)),1) AS fg2a_per_100, SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)) as fg2_pct_csk, NULL as fg2_pct_incomplete, TRIM(LEADING '0' FROM ROUND(SUM(fg - IFNULL(fg3, 0)) / SUM(fga - IFNULL(fg3a, 0)),3)) AS fg2_pct, ( (SUM(fg3 * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg3 IS NOT NULL))) ) * 100 as fg3_per_100_csk, NULL as fg3_per_100_incomplete, ROUND(( (SUM(fg3 * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg3 IS NOT NULL))) ) * 100,1) AS fg3_per_100, ( (SUM(fg3a * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg3a IS NOT NULL))) ) * 100 as fg3a_per_100_csk, NULL as fg3a_per_100_incomplete, ROUND(( (SUM(fg3a * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fg3a IS NOT NULL))) ) * 100,1) AS fg3a_per_100, IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL) as fg3_pct_csk, NULL as fg3_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fg3a), SUM(fg3) / SUM(fg3a), NULL),3)) AS fg3_pct, ( (SUM(ft * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974))) ) * 100 as ft_per_100_csk, SUM(ft IS NULL) as ft_per_100_incomplete, ROUND(( (SUM(ft * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974))) ) * 100,1) AS ft_per_100, ( (SUM(fta * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fta IS NOT NULL))) ) * 100 as fta_per_100_csk, SUM(fta IS NULL) as fta_per_100_incomplete, ROUND(( (SUM(fta * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(fta IS NOT NULL))) ) * 100,1) AS fta_per_100, IF(SUM(fta), SUM(ft) / SUM(fta), NULL) as ft_pct_csk, SUM(fta IS NULL)+SUM(ft IS NULL) as ft_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fta), SUM(ft) / SUM(fta), NULL),3)) AS ft_pct, IF(((SUM(fga * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 + (SUM(fta * (year_id >= 1974) * (fta IS NOT NULL))/SUM(team_poss*(fta IS NOT NULL)))*100), ((SUM(pts * (year_id >= 1974) * (fta IS NOT NULL))/SUM(team_poss))*100) / (2 * ((SUM(fga)/(SUM(team_poss)))*100 + 0.44 * (SUM(fta * (fta IS NOT NULL))/SUM(team_poss*(fta IS NOT NULL)))*100)), NULL) as ts_pct_per_100_csk, SUM(fga IS NULL)+SUM(fta IS NULL)+SUM(pts IS NULL) as ts_pct_per_100_incomplete, TRIM(LEADING '0' FROM ROUND(IF(((SUM(fga * (year_id >= 1974))/(SUM(team_poss * (year_id >= 1974))))*100 + (SUM(fta * (year_id >= 1974) * (fta IS NOT NULL))/SUM(team_poss*(fta IS NOT NULL)))*100), ((SUM(pts * (year_id >= 1974) * (fta IS NOT NULL))/SUM(team_poss))*100) / (2 * ((SUM(fga)/(SUM(team_poss)))*100 + 0.44 * (SUM(fta * (fta IS NOT NULL))/SUM(team_poss*(fta IS NOT NULL)))*100)), NULL),1)) AS ts_pct_per_100, ( (SUM(orb * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(orb IS NOT NULL))) ) * 100 as orb_per_100_csk, SUM(orb IS NULL) as orb_per_100_incomplete, ROUND(( (SUM(orb * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(orb IS NOT NULL))) ) * 100,1) AS orb_per_100, ((SUM(trb * (year_id >= 1974) * (orb * (year_id >= 1974) IS NOT NULL))/SUM(team_poss * (year_id >= 1974)*(orb IS NOT NULL)))*100 - (SUM(orb * (orb IS NOT NULL))/SUM(team_poss*(orb IS NOT NULL)))*100) as drb_per_100_csk, SUM(trb IS NULL)+SUM(orb IS NULL) as drb_per_100_incomplete, ROUND(((SUM(trb * (year_id >= 1974) * (orb * (year_id >= 1974) IS NOT NULL))/SUM(team_poss * (year_id >= 1974)*(orb IS NOT NULL)))*100 - (SUM(orb * (orb IS NOT NULL))/SUM(team_poss*(orb IS NOT NULL)))*100),1) AS drb_per_100, ( (SUM(trb * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(trb IS NOT NULL))) ) * 100 as trb_per_100_csk, SUM(trb IS NULL) as trb_per_100_incomplete, ROUND(( (SUM(trb * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(trb IS NOT NULL))) ) * 100,1) AS trb_per_100, ( (SUM(ast * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(ast IS NOT NULL))) ) * 100 as ast_per_100_csk, SUM(ast IS NULL) as ast_per_100_incomplete, ROUND(( (SUM(ast * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(ast IS NOT NULL))) ) * 100,1) AS ast_per_100, ( (SUM(stl * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(stl IS NOT NULL))) ) * 100 as stl_per_100_csk, SUM(stl IS NULL) as stl_per_100_incomplete, ROUND(( (SUM(stl * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(stl IS NOT NULL))) ) * 100,1) AS stl_per_100, ( (SUM(blk * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(blk IS NOT NULL))) ) * 100 as blk_per_100_csk, SUM(blk IS NULL) as blk_per_100_incomplete, ROUND(( (SUM(blk * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(blk IS NOT NULL))) ) * 100,1) AS blk_per_100, ( (SUM(tov * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(tov IS NOT NULL))) ) * 100 as tov_per_100_csk, SUM(tov IS NULL) as tov_per_100_incomplete, ROUND(( (SUM(tov * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(tov IS NOT NULL))) ) * 100,1) AS tov_per_100, ( (SUM(pf * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(pf IS NOT NULL))) ) * 100 as pf_per_100_csk, SUM(pf IS NULL) as pf_per_100_incomplete, ROUND(( (SUM(pf * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(pf IS NOT NULL))) ) * 100,1) AS pf_per_100, ( (SUM(pts * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(pts IS NOT NULL))) ) * 100 as pts_per_100_csk, SUM(pts IS NULL) as pts_per_100_incomplete, ROUND(( (SUM(pts * (year_id >= 1974)))/(SUM(team_poss * (year_id >= 1974)*(pts IS NOT NULL))) ) * 100,1) AS pts_per_100, SUM(poss * off_rtg) / SUM((off_rtg IS NOT NULL) * poss) as off_rtg_csk, SUM(poss IS NULL)+SUM(off_rtg IS NULL) as off_rtg_incomplete, ROUND(SUM(poss * off_rtg) / SUM((off_rtg IS NOT NULL) * poss),0) AS off_rtg, SUM(def_poss * def_rtg) / SUM((def_rtg IS NOT NULL) * def_poss) as def_rtg_csk, SUM(def_rtg IS NULL)+SUM(def_poss IS NULL) as def_rtg_incomplete, ROUND(SUM(def_poss * def_rtg) / SUM((def_rtg IS NOT NULL) * def_poss),0) AS def_rtg, SUM(team_poss IS NULL) as team_poss_incomplete, SUM(team_poss) AS team_poss
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND phase_id="PST"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.01 seconds
Table Build Time: 0.03 seconds
Table Build Time: 0.03 seconds
--------------------------------------
player_adv
Page Setup Time: 0.00156 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, SUM(games IS NULL) as games_incomplete, SUM(games) AS games, SUM(games_started IS NULL) as games_started_incomplete, SUM(games_started) AS games_started, SUM(mp IS NULL) as mp_incomplete, SUM(mp) AS mp, SUM(mp * per) / SUM(mp * (per IS NOT NULL)) as per_csk, SUM(per IS NULL)+SUM(mp IS NULL) as per_incomplete, ROUND(SUM(mp * per) / SUM(mp * (per IS NOT NULL)),1) AS per, IF(SUM(fga + fta), SUM(pts) / SUM(2 * (fga + 0.44 * fta)), NULL) as ts_pct_csk, SUM(pts IS NULL)+SUM(fta IS NULL)+SUM(fga IS NULL) as ts_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga + fta), SUM(pts) / SUM(2 * (fga + 0.44 * fta)), NULL),3)) AS ts_pct, SUM(mp * orb_pct) / SUM((orb_pct IS NOT NULL) * mp) as orb_pct_csk, SUM(mp IS NULL)+SUM(orb_pct IS NULL) as orb_pct_incomplete, ROUND(100 * (SUM(mp * orb_pct) / SUM((orb_pct IS NOT NULL) * mp)),1) AS orb_pct, SUM(mp * trb_pct) / SUM((trb_pct IS NOT NULL) * mp) as trb_pct_csk, SUM(trb_pct IS NULL)+SUM(mp IS NULL) as trb_pct_incomplete, ROUND(100 * (SUM(mp * trb_pct) / SUM((trb_pct IS NOT NULL) * mp)),1) AS trb_pct, SUM(mp * ast_pct) / SUM((ast_pct IS NOT NULL) * mp) as ast_pct_csk, SUM(mp IS NULL)+SUM(ast_pct IS NULL) as ast_pct_incomplete, ROUND(100 * (SUM(mp * ast_pct) / SUM((ast_pct IS NOT NULL) * mp)),1) AS ast_pct, SUM(mp * stl_pct) / SUM((stl_pct IS NOT NULL) * mp) as stl_pct_csk, SUM(stl_pct IS NULL)+SUM(mp IS NULL) as stl_pct_incomplete, ROUND(100 * (SUM(mp * stl_pct) / SUM((stl_pct IS NOT NULL) * mp)),1) AS stl_pct, SUM(mp * blk_pct) / SUM((blk_pct IS NOT NULL) * mp) as blk_pct_csk, SUM(blk_pct IS NULL)+SUM(mp IS NULL) as blk_pct_incomplete, ROUND(100 * (SUM(mp * blk_pct) / SUM((blk_pct IS NOT NULL) * mp)),1) AS blk_pct, SUM(tov) / SUM(fga + 0.44*fta + tov) as tov_pct_csk, SUM(tov IS NULL)+SUM(fga IS NULL)+SUM(fta IS NULL) as tov_pct_incomplete, ROUND(100 * (SUM(tov) / SUM(fga + 0.44*fta + tov)),1) AS tov_pct, SUM(mp * usg_pct) / SUM((usg_pct IS NOT NULL) * mp) as usg_pct_csk, SUM(mp IS NULL)+SUM(usg_pct IS NULL) as usg_pct_incomplete, ROUND(100 * (SUM(mp * usg_pct) / SUM((usg_pct IS NOT NULL) * mp)),1) AS usg_pct, SUM(ows) as ows_csk, SUM(ows IS NULL) as ows_incomplete, ROUND(SUM(ows),1) AS ows, SUM(dws) as dws_csk, SUM(dws IS NULL) as dws_incomplete, ROUND(SUM(dws),1) AS dws, SUM(ws) as ws_csk, SUM(ws IS NULL) as ws_incomplete, ROUND(SUM(ws),1) AS ws, 48 * (SUM(ws * (mp IS NOT NULL)) / SUM(mp)) as ws_per_48_csk, SUM(mp IS NULL)+SUM(ws IS NULL) as ws_per_48_incomplete, TRIM(LEADING '0' FROM ROUND(48 * (SUM(ws * (mp IS NOT NULL)) / SUM(mp)),3)) AS ws_per_48, (SUM(obpm * mp) / SUM((obpm IS NOT NULL) * mp)) as obpm_csk, SUM(mp IS NULL)+SUM(obpm IS NULL) as obpm_incomplete, ROUND((SUM(obpm * mp) / SUM((obpm IS NOT NULL) * mp)),1) AS obpm, (SUM(dbpm * mp) / SUM((dbpm IS NOT NULL) * mp)) as dbpm_csk, SUM(dbpm IS NULL)+SUM(mp IS NULL) as dbpm_incomplete, ROUND((SUM(dbpm * mp) / SUM((dbpm IS NOT NULL) * mp)),1) AS dbpm, (SUM(bpm * mp) / SUM((bpm IS NOT NULL) * mp)) as bpm_csk, SUM(bpm IS NULL)+SUM(mp IS NULL) as bpm_incomplete, ROUND((SUM(bpm * mp) / SUM((bpm IS NOT NULL) * mp)),1) AS bpm, SUM(vorp) as vorp_csk, SUM(vorp IS NULL) as vorp_incomplete, ROUND(SUM(vorp),1) AS vorp
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND type="reg"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.01 seconds
SELECT person_id, IF(MIN(age)=MAX(age), MIN(age), CONCAT(MIN(age), '-', MAX(age))) as age_range, MIN(year_id) as year_min_csk, IF(comp_id='WNBA', MIN(year_id), CONCAT_WS('-', (MIN(year_id) - 1), RIGHT(MIN(year_id), 2))) as year_min, MAX(year_id) as year_max_csk, IF(comp_id='WNBA', MAX(year_id), CONCAT_WS('-', (MAX(year_id) - 1), RIGHT(MAX(year_id), 2))) as year_max, SUM(games IS NULL) as games_incomplete, SUM(games) AS games, SUM(games_started IS NULL) as games_started_incomplete, SUM(games_started) AS games_started, SUM(mp IS NULL) as mp_incomplete, SUM(mp) AS mp, SUM(mp * per) / SUM(mp * (per IS NOT NULL)) as per_csk, SUM(per IS NULL)+SUM(mp IS NULL) as per_incomplete, ROUND(SUM(mp * per) / SUM(mp * (per IS NOT NULL)),1) AS per, IF(SUM(fga + fta), SUM(pts) / SUM(2 * (fga + 0.44 * fta)), NULL) as ts_pct_csk, SUM(pts IS NULL)+SUM(fta IS NULL)+SUM(fga IS NULL) as ts_pct_incomplete, TRIM(LEADING '0' FROM ROUND(IF(SUM(fga + fta), SUM(pts) / SUM(2 * (fga + 0.44 * fta)), NULL),3)) AS ts_pct, SUM(mp * orb_pct) / SUM((orb_pct IS NOT NULL) * mp) as orb_pct_csk, SUM(mp IS NULL)+SUM(orb_pct IS NULL) as orb_pct_incomplete, ROUND(100 * (SUM(mp * orb_pct) / SUM((orb_pct IS NOT NULL) * mp)),1) AS orb_pct, SUM(mp * trb_pct) / SUM((trb_pct IS NOT NULL) * mp) as trb_pct_csk, SUM(trb_pct IS NULL)+SUM(mp IS NULL) as trb_pct_incomplete, ROUND(100 * (SUM(mp * trb_pct) / SUM((trb_pct IS NOT NULL) * mp)),1) AS trb_pct, SUM(mp * ast_pct) / SUM((ast_pct IS NOT NULL) * mp) as ast_pct_csk, SUM(mp IS NULL)+SUM(ast_pct IS NULL) as ast_pct_incomplete, ROUND(100 * (SUM(mp * ast_pct) / SUM((ast_pct IS NOT NULL) * mp)),1) AS ast_pct, SUM(mp * stl_pct) / SUM((stl_pct IS NOT NULL) * mp) as stl_pct_csk, SUM(stl_pct IS NULL)+SUM(mp IS NULL) as stl_pct_incomplete, ROUND(100 * (SUM(mp * stl_pct) / SUM((stl_pct IS NOT NULL) * mp)),1) AS stl_pct, SUM(mp * blk_pct) / SUM((blk_pct IS NOT NULL) * mp) as blk_pct_csk, SUM(blk_pct IS NULL)+SUM(mp IS NULL) as blk_pct_incomplete, ROUND(100 * (SUM(mp * blk_pct) / SUM((blk_pct IS NOT NULL) * mp)),1) AS blk_pct, SUM(tov) / SUM(fga + 0.44*fta + tov) as tov_pct_csk, SUM(tov IS NULL)+SUM(fga IS NULL)+SUM(fta IS NULL) as tov_pct_incomplete, ROUND(100 * (SUM(tov) / SUM(fga + 0.44*fta + tov)),1) AS tov_pct, SUM(mp * usg_pct) / SUM((usg_pct IS NOT NULL) * mp) as usg_pct_csk, SUM(mp IS NULL)+SUM(usg_pct IS NULL) as usg_pct_incomplete, ROUND(100 * (SUM(mp * usg_pct) / SUM((usg_pct IS NOT NULL) * mp)),1) AS usg_pct, SUM(ows) as ows_csk, SUM(ows IS NULL) as ows_incomplete, ROUND(SUM(ows),1) AS ows, SUM(dws) as dws_csk, SUM(dws IS NULL) as dws_incomplete, ROUND(SUM(dws),1) AS dws, SUM(ws) as ws_csk, SUM(ws IS NULL) as ws_incomplete, ROUND(SUM(ws),1) AS ws, 48 * (SUM(ws * (mp IS NOT NULL)) / SUM(mp)) as ws_per_48_csk, SUM(mp IS NULL)+SUM(ws IS NULL) as ws_per_48_incomplete, TRIM(LEADING '0' FROM ROUND(48 * (SUM(ws * (mp IS NOT NULL)) / SUM(mp)),3)) AS ws_per_48, (SUM(obpm * mp) / SUM((obpm IS NOT NULL) * mp)) as obpm_csk, SUM(mp IS NULL)+SUM(obpm IS NULL) as obpm_incomplete, ROUND((SUM(obpm * mp) / SUM((obpm IS NOT NULL) * mp)),1) AS obpm, (SUM(dbpm * mp) / SUM((dbpm IS NOT NULL) * mp)) as dbpm_csk, SUM(dbpm IS NULL)+SUM(mp IS NULL) as dbpm_incomplete, ROUND((SUM(dbpm * mp) / SUM((dbpm IS NOT NULL) * mp)),1) AS dbpm, (SUM(bpm * mp) / SUM((bpm IS NOT NULL) * mp)) as bpm_csk, SUM(bpm IS NULL)+SUM(mp IS NULL) as bpm_incomplete, ROUND((SUM(bpm * mp) / SUM((bpm IS NOT NULL) * mp)),1) AS bpm, SUM(vorp) as vorp_csk, SUM(vorp IS NULL) as vorp_incomplete, ROUND(SUM(vorp),1) AS vorp
FROM sup_player_team_seasons as st
JOIN sup_people USING (person_id)
JOIN sup_players USING (person_id)
JOIN sup_phase_seasons USING (comp_id, phase_id, year_id)
JOIN sup_comp_seasons USING (comp_id, year_id)
WHERE ((person_id=?) OR (person_id=?))
AND phase_id="PST"
GROUP BY person_id
ORDER BY person_id
SQL PARAMS -- $VAR1 = [
'davisan02',
'doncilu01'
];
Query Time: 0.00 seconds
Table Build Time: 0.03 seconds
Table Build Time: 0.03 seconds
--------------------------------------
SH->PARAM -- $VAR1 = {
'player_id2' => 'doncilu01',
't2yrto' => 2026,
'match' => 'versus_playervplayer',
'player_id1' => 'davisan02',
't1yrto' => 2026
};
SH->PARAM_NO_DEFAULT -- $VAR1 = {
'player_id1' => 'davisan02',
'player_id2' => 'doncilu01'
};
Data coverage:
Game data: since 1946-47 unless otherwise noted. Regular season: PTS, FG, FT, 3P complete all-time. FTA complete back to 1948-49. FGA, TRB, AST, PF, GS over 99% complete back to 1975-76. MP over 99% complete back to 1976-77. +/- complete back to 1996-97. All other box score stats (3PA, ORB, DRB, STL, BLK, TOV) complete back to 1983-84. Playoffs: PTS, FG, FT, FTA, 3P, 3PA complete all-time. PF complete back to 1948-49. FGA, TRB, AST complete back to 1962-63. GS complete back to 1973-74. MP complete back to 1974-75. +/- complete back to 1996-97. STL, BLK, TOV complete back to 1982-83. ORB, DRB complete back to 1983-84. BPM not available for WNBA & ABA.
Season data: since 1946-47 unless otherwise noted. All box score stats are covered all-time (though not all stats were tracked for all of NBA history). PER since 1951-52. AST% since 1964-65. TRB% since 1970-71. BPM, VORP, DRtg and Per 100 Poss stats since 1973-74. ORtg since 1977-78. GS since 1981-82. Some stats were available earlier in the ABA. WNBA all-time (since 1997) unless otherwise noted. BPM and VORP not available for WNBA.
Please see our data coverage page for details.

We're Social...for Statheads
Site Last Updated:
Question, Comment, Feedback, or Correction?
Subscribe to our Free Email Newsletter
Do you have a sports website? Or write about sports? We have tools and resources that can help you use sports data. Find out more.