Data runs from 1901 to 2020 for regular season data, 1933-Present for the All-Star Game, and 1903-Present for the Postseason.
SELECT /* br:game_finder:7 */ have_pbp, result_pitcher, name_common as player, concat('/players/',left(bio.player_ID,1),'/',bio.player_ID,'.shtml') as player_link, A.year_game as year_game, A.pitcher_game as career_game_num,
pitching_team_id, batting_team_id,
A.date_game, A.date_game_number, A.game_id as date_game_link, A.game_id as game_id,
batting_team_id as opp_ID, concat('/teams/',batting_team_id, '/', tgl_stats.year_game, '.shtml') as opp_ID_link, concat( if(tgl_stats.W=1, 'W ', if(tgl_stats.L=1,'L ','T ')), RS,'-',RA) as game_result, tgl_stats.W as teamW, tgl_stats.L as teamL, tgl_stats.RS as teamRS, tgl_stats.RS, tgl_stats.RA, tgl_stats.RS - tgl_stats.RA as run_diff,if(homeORvis = 'V','@',' ') as team_homeORaway, tgl_stats.game_length_outs,
pitching_team_id as team_id, concat('/teams/',pitching_team_id, '/', tgl_stats.year_game, '.shtml') as team_id_link,
concat(
if(SHO=1,
concat('SHO',if(inning_first is null OR floor(1 + (inning_last - (homeORvis='V'))/6)=9,
'',
CONCAT('(',floor(1 + (inning_last - (homeORvis='V'))/6),')'))),
if(CG=1,
concat('CG',if(inning_first is null OR floor(1 + (inning_last - (homeORvis='V'))/6)=9,
'',
CONCAT('(',floor(1 + (inning_last - (homeORvis='V'))/6),')'))),
concat(if(GS=1,
concat('GS-',if(inning_first is null,' ',floor(1 + (inning_last - (homeORvis='V'))/6))),
if(inning_first is null,'',
concat(floor(1 + inning_first/6),'-',
if(GF=1,CONCAT('GF',
if(inning_first is null OR floor(1 + (inning_last - (homeORvis='V'))/6)=9,
'',
CONCAT('(',floor(1 + (inning_last - (homeORvis='V'))/6),')'))),
floor(1 + (inning_last - (homeORvis='V'))/6)))))))),
if(A.W=1 AND A.BSv=1,', BW',
if(A.L=1 AND A.BSv=1,', BL',
if(A.W=1 AND A.Hold=1,', HW',
if(A.L=1 AND A.Hold=1,', HL',
if(A.W=1,', W',
if(A.L=1,', L',
if(A.S=1,', S',
if(A.Hold=1,', H', if(A.BSv=1,',BS',''))))))))
)
) as pitcher_game_result,
if(A.W=1 AND A.BSv=1, 3,
if(A.L=1 AND A.BSv=1, -3,
if(A.W=1, 5,
if(A.L=1, -2,
if(A.S=1, 4,
if(A.Hold=1, 1,
if(A.BSv=1, -1, 0
))))))
) AS pitcher_game_result_csk
,
A.IPouts, A.BF, A.W, A.L, A.S, A.GS, A.GF, A.CG, A.SHO, A.pitches, A.strikes, A.ER, A.R-A.ER as UER,
A.R, A.H, A.2B, A.3B, A.HR, A.BB, A.IBB, A.SO, A.SB, A.CS, A.HBP, A.SH, A.SF, A.ROE, A.GIDP, A.BK, A.WP,
A.PickOffs AS pickoffs, A.AB, DR AS days_rest,
A.wpa_def, A.wpa_li AS wpa_li_def, A.re24_def, A.leverage_index_avg,
A.inherited_runners, A.inherited_score, A.event_num_start, A.event_num_finish, A.game_score,
tgl_stats.game_length_minutes as game_length_minutes,
tgl_stats.attendance as attendance,
birth_year, birth_month, birth_day, death_year,
if (birth_country = 'Canada' OR birth_country='United States',concat(birth_city,', ',birth_state),if(birth_city is null, birth_country, concat(birth_city,', ',birth_country))) as birth_location,
if (death_country = 'Canada' OR death_country='United States',concat(death_city,', ',death_state),if(birth_city is null, death_country, concat(death_city,', ',death_country))) as death_location
,
ROUND(draftkings_points, 2) AS draftkings_points,
ROUND(fanduel_points, 2) AS fanduel_points
from pgl as A
inner join bio on bio.player_ID=result_pitcher inner join tgl_stats as tgl_stats on tgl_stats.game_id=A.game_id and tgl_stats.team_id=A.pitching_team_id inner join tgl as tgl on tgl_stats.game_id=tgl.game_id inner join players on players.player_ID=bio.player_ID LEFT JOIN pgl_dfs AS dfs ON A.game_id = dfs.dfs_game_id AND A.result_pitcher = dfs.dfs_result_pitcher
WHERE
A.year_game = 2020
AND A.result_pitcher = 'perezge01'
ORDER BY A.SO DESC, A.date_game DESC, A.date_game_number DESC limit 0,100
If you utilize material unique to a Sports Reference
site for a tweet, an article, or for research for a
broadcast or podcast, please strongly consider citing this site as the
source for the material. It would be greatly appreciated and would
help us continue to produce this material.
We're Social...for Statheads
Every Sports Reference Social Media Account
Site Last Updated: Wednesday, March 3, 11:48PM
Question, Comment, Feedback, or Correction?
Are you a Stathead, too? Subscribe to our Free Newsletter
This Month in Sports Reference
Find out when we add a feature or make a change
Do you have a sports website? Or write about sports? We have tools and resources that can help you use sports data. Find out more.