turbot/nba

Query: nba_player_experience_distribution_by_team

Usage

powerpipe query nba.query.nba_player_experience_distribution_by_team

SQL

select
team_name,
sum(case when season_exp = 0 then 1 else 0 end) as Rookies,
sum(case when season_exp between 1 and 3 then 1 else 0 end) as "1_to_3_years",
sum(case when season_exp between 4 and 6 then 1 else 0 end) as "4_to_6_years",
sum(case when season_exp >= 7 then 1 else 0 end) as "7_years_plus"
from
common_player_info
group by
team_name
order by
team_name;

Dashboards

The query is used in the dashboards: