Report not found

There was a problem finding this report.
Playoff Length - Percent of Games Played By Champ
April 30, 2014 · Refreshed over 4 years ago
Description
Full blog post: http://blog.modeanalytics.com/are-the-playoffs-taking-forever/

Collaborators

Run History
SELECT x.league, AVG(x.champion_playoff_games/x.playoff_games) AS percent_of_playoff_games_played_by_eventual_champion 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, CASE WHEN z.playoff_games = 0 THEN 1 ELSE z.playoff_games END AS playoff_games, z.pl_champ_games AS champion_playoff_games FROM ( SELECT t.league, t.season, MAX(w.team) AS champion, COUNT(CASE WHEN t.game_type != 'regular_season' THEN 1 ELSE NULL END)/2::FLOAT AS playoff_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 ORDER BY 1 LIMIT 100
SELECT x.league, AVG(x.champion_playoff_games/x.playoff_games) AS percent_of_playoff_games_played_by_eventual_champion 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, CASE WHEN z.playoff_games = 0 THEN 1 ELSE z.playoff_games END AS playoff_games, z.pl_champ_games AS champion_playoff_games FROM ( SELECT t.league, t.season, MAX(w.team) AS champion, COUNT(CASE WHEN t.game_type != 'regular_season' THEN 1 ELSE NULL END)/2::FLOAT AS playoff_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 ORDER BY 1
<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_1d7dfffba9a9" 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