Report not found

There was a problem finding this report.
Retrosheet - Run Differential
April 10, 2014 · Refreshed over 4 years ago
Description
Shows relationship between run differential in wins in first 30 games and final win total

Collaborators

Run History
SELECT ROUND(z.run_differential*4)/4::FLOAT AS "Average Run Differential in Wins through 30 Games", COUNT(*) AS "Teams", ROUND(AVG(z.total_wins),1) AS "Average 162 Game Win Total" FROM ( SELECT a.year, a.team, a.run_differential, t.total_wins FROM ( SELECT DATE_TRUNC('year',a.date) AS year, a.team, AVG(runs_scored - runs_allowed) AS run_differential FROM benn.retrosheet_games_by_team a WHERE a.date >= '1999-01-01' AND a.game_number <= 30 AND a.winner = TRUE GROUP BY 1,2 ) a JOIN ( SELECT DATE_TRUNC('year',t.date) AS year, t.team, COUNT(t.game_id) AS total_wins FROM benn.retrosheet_games_by_team t WHERE t.winner = TRUE AND t.date >= '1999-01-01' GROUP BY 1,2 ) t ON t.year = a.year AND t.team = a.team ) z GROUP BY 1 ORDER BY 1
SELECT ROUND(z.run_differential*4)/4::FLOAT AS "Average Run Differential in Wins through 30 Games", COUNT(*) AS "Teams", ROUND(AVG(z.total_wins),1) AS "Average 162 Game Win Total" FROM ( SELECT a.year, a.team, a.run_differential, t.total_wins FROM ( SELECT DATE_TRUNC('year',a.date) AS year, a.team, AVG(runs_scored - runs_allowed) AS run_differential FROM benn.retrosheet_games_by_team a WHERE a.date >= '1999-01-01' AND a.game_number <= 30 AND a.winner = TRUE GROUP BY 1,2 ) a JOIN ( SELECT DATE_TRUNC('year',t.date) AS year, t.team, COUNT(t.game_id) AS total_wins FROM benn.retrosheet_games_by_team t WHERE t.winner = TRUE AND t.date >= '1999-01-01' GROUP BY 1,2 ) t ON t.year = a.year AND t.team = a.team ) z 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_045b0e8fda51" 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