Monday, April 22, 2013

Same Name Game

Found this entry on a blog post about “pouring over” retro sheets to find some data. Not sure if the pouring over is thrown in there for dramatic effect or what. Honestly once you have the retro sheet loaded up in SQL Server you really do not have to pour over anything, just write a query.


I digress. Anyway the blog post wondered how many times a batter shared the same first name of the previous batter’s last name. The author of the blog stated that this has happened 130 times. After some “pouring over” I discovered the author had only reported 1 instance per game. 


I wanted to see how many actual plate appearances this same name game had happened. My data set is only 1952-2012 and I show 315 Times where  a batter had the same first name as the previous batter’s last name.


SELECT e.GAME_ID, e.YEAR_ID,p.lastname, p.firstname, p2.lastname, p2.firstname
FROM dbo.[events] e JOIN dbo.[lkup_people] p ON e.BAT_ID = p.id
JOIN dbo.[events] e2 ON e2.seq_events = e.seq_events+1
JOIN dbo.[lkup_people] p2 ON e2.BAT_ID = p2.id
WHERE p.lastname = p2.firstname
AND e.BAT_TEAM_ID = e2.BAT_TEAM_ID

image



Looking more closely at the Casey Blake/Blake DeWitt combo we see that Casey Blake reached base 48% of the time before Blake DeWitt stepped to the plate. Blake DeWitt would then reach base 38.5% of the time directly following Casey Blake. 


image



SELECT e.GAME_ID, e.YEAR_ID,p.lastname, p.firstname, p2.lastname, p2.firstname,e.EVENT_CD, e2.EVENT_CD
FROM dbo.[events] e JOIN dbo.[lkup_people] p ON e.BAT_ID = p.id
JOIN dbo.[events] e2 ON e2.seq_events = e.seq_events+1
JOIN dbo.[lkup_people] p2 ON e2.BAT_ID = p2.id
WHERE p.lastname = p2.firstname
AND e.BAT_TEAM_ID = e2.BAT_TEAM_ID

0 comments:

Post a Comment