Report not found

There was a problem finding this report.
Playoff Length - Days per Games
May 1, 2014 · Refreshed about 4 years ago
Description
Full blog post: http://blog.modeanalytics.com/are-the-playoffs-taking-forever/

Collaborators

Run History
SELECT y.league, y.regular_season_pace, y.playoff_pace, y.playoff_pace/y.regular_season_pace AS percent_slowdown FROM ( SELECT x.league, AVG((x.champ_length_of_season - 1)/(x.champion_regular_season_games - 1)) AS regular_season_pace, AVG((x.champ_length_of_playoffs - 1)/(x.champion_playoff_games - 1)) AS playoff_pace FROM ( SELECT z.league, CASE WHEN LENGTH(z.season) = 5 THEN CASE WHEN LEFT(RIGHT(z.season,2),1) IN ('0','1') THEN CONCAT('20',RIGHT(z.season,2))::INT ELSE CONCAT('19',RIGHT(z.season,2))::INT END ELSE z.season::INT END AS season, z.champion, EXTRACT('DAY' FROM z.rg_champ_end - z.rg_champ_start) AS champ_length_of_season, EXTRACT('DAY' FROM z.pl_champ_end - z.pl_champ_start) AS champ_length_of_playoffs, CASE WHEN z.rs_champ_games = 0 THEN 1 ELSE z.rs_champ_games END AS champion_regular_season_games, z.pl_champ_games AS champion_playoff_games FROM ( SELECT t.league, t.season, MAX(w.team) AS champion, MIN(CASE WHEN w.team IS NOT NULL AND t.game_type = 'regular_season' THEN t.date ELSE NULL END) AS rg_champ_start, MAX(CASE WHEN w.team IS NOT NULL AND t.game_type = 'regular_season' THEN t.date ELSE NULL END) AS rg_champ_end, MIN(CASE WHEN w.team IS NOT NULL AND t.game_type != 'regular_season' THEN t.date ELSE NULL END) AS pl_champ_start, MAX(CASE WHEN w.team IS NOT NULL AND t.game_type != 'regular_season' THEN t.date ELSE NULL END) AS pl_champ_end, COUNT(CASE WHEN w.team IS NOT NULL AND t.game_type = 'regular_season' THEN 1 ELSE NULL END)::FLOAT AS rs_champ_games, COUNT(CASE WHEN w.team IS NOT NULL AND t.game_type != 'regular_season' THEN 1 ELSE NULL END)::FLOAT AS pl_champ_games FROM benn.professional_sports_game_log t LEFT JOIN (SELECT c.league, c.season, c.team, c.date, MAX(c.date) OVER (PARTITION BY c.league,c.season) AS last_game, c.result FROM benn.professional_sports_game_log c WHERE c.result = 'win' AND c.game_type != 'regular_season' ) w ON w.league = t.league AND w.season = t.season AND w.team = t.team AND w.date = w.last_game WHERE t.date >= '1969-01-01' GROUP BY 1,2 ) z ) x WHERE x.season >= 2003 AND (x.season != 1994 OR x.league != 'mlb') AND (x.season != 1982 OR x.league != 'nfl') AND (x.season != 1995 OR x.league != 'nhl') AND (x.season != 2005 OR x.league != 'nhl') AND (x.season != 2013 OR x.league != 'nhl') AND (x.season != 1999 OR x.league != 'nba') AND (x.season != 2012 OR x.league != 'nba') GROUP BY 1 ) y ORDER BY 1 LIMIT 100
SELECT y.league, y.regular_season_pace, y.playoff_pace, y.playoff_pace/y.regular_season_pace AS percent_slowdown FROM ( SELECT x.league, AVG((x.champ_length_of_season - 1)/(x.champion_regular_season_games - 1)) AS regular_season_pace, AVG((x.champ_length_of_playoffs - 1)/(x.champion_playoff_games - 1)) AS playoff_pace FROM ( SELECT z.league, CASE WHEN LENGTH(z.season) = 5 THEN CASE WHEN LEFT(RIGHT(z.season,2),1) IN ('0','1') THEN CONCAT('20',RIGHT(z.season,2))::INT ELSE CONCAT('19',RIGHT(z.season,2))::INT END ELSE z.season::INT END AS season, z.champion, EXTRACT('DAY' FROM z.rg_champ_end - z.rg_champ_start) AS champ_length_of_season, EXTRACT('DAY' FROM z.pl_champ_end - z.pl_champ_start) AS champ_length_of_playoffs, CASE WHEN z.rs_champ_games = 0 THEN 1 ELSE z.rs_champ_games END AS champion_regular_season_games, z.pl_champ_games AS champion_playoff_games FROM ( SELECT t.league, t.season, MAX(w.team) AS champion, MIN(CASE WHEN w.team IS NOT NULL AND t.game_type = 'regular_season' THEN t.date ELSE NULL END) AS rg_champ_start, MAX(CASE WHEN w.team IS NOT NULL AND t.game_type = 'regular_season' THEN t.date ELSE NULL END) AS rg_champ_end, MIN(CASE WHEN w.team IS NOT NULL AND t.game_type != 'regular_season' THEN t.date ELSE NULL END) AS pl_champ_start, MAX(CASE WHEN w.team IS NOT NULL AND t.game_type != 'regular_season' THEN t.date ELSE NULL END) AS pl_champ_end, COUNT(CASE WHEN w.team IS NOT NULL AND t.game_type = 'regular_season' THEN 1 ELSE NULL END)::FLOAT AS rs_champ_games, COUNT(CASE WHEN w.team IS NOT NULL AND t.game_type != 'regular_season' THEN 1 ELSE NULL END)::FLOAT AS pl_champ_games FROM benn.professional_sports_game_log t LEFT JOIN (SELECT c.league, c.season, c.team, c.date, MAX(c.date) OVER (PARTITION BY c.league,c.season) AS last_game, c.result FROM benn.professional_sports_game_log c WHERE c.result = 'win' AND c.game_type != 'regular_season' ) w ON w.league = t.league AND w.season = t.season AND w.team = t.team AND w.date = w.last_game WHERE t.date >= '1969-01-01' GROUP BY 1,2 ) z ) x WHERE x.season >= 2003 AND (x.season != 1994 OR x.league != 'mlb') AND (x.season != 1982 OR x.league != 'nfl') AND (x.season != 1995 OR x.league != 'nhl') AND (x.season != 2005 OR x.league != 'nhl') AND (x.season != 2013 OR x.league != 'nhl') AND (x.season != 1999 OR x.league != 'nba') AND (x.season != 2012 OR x.league != 'nba') GROUP BY 1 ) y ORDER BY 1 LIMIT 100
<div class="mode-header embed-hidden"> <h1>{{ title }}</h1> <p>{{ description }}</p> </div> <div class="container mode-grid"> <div class="row"> <div class="col-md-12"> <mode-table id="table_22d381e0d73a" dataset="dataset" options="table_options"></mode-table> </div> </div> </div>
{{ dataSourceName(params.queryId) }}

The dataset is too large to view in browser

Export

Looks like something went wrong with your query.

{{ DS.queryRuns[params.queryId].errorMessage }}
This query was cancelled