Files
Streamlit_NBA/dbt_nba/reports/sources/nba/game_drama.sql
T
nprasad2077 3d5de1dc3e
test / test (push) Successful in 9s
complete app
2026-09-17 17:39:22 -05:00

9 lines
491 B
SQL

select
season_start_year || '-' || substr(cast(season_start_year + 1 as varchar), 3, 2) as season,
round(100.0 * sum(case when is_overtime then 1 else 0 end) / count(*), 1) as ot_pct,
round(100.0 * sum(case when point_differential <= 5 then 1 else 0 end) / count(*), 1) as clutch_pct,
round(100.0 * sum(case when point_differential >= 20 then 1 else 0 end) / count(*), 1) as blowout_pct
from main_intermediate.int_games_enriched
group by season_start_year
order by season_start_year