I am desperately looking to add columns for salary, height and weight to a merged MLBAM atbats and pitches table for all pitchers and batters using MySQL.
I did locate salaries information from the Lahman database files and created a table from it. But since its players comprise only a subset of those included in the merged MLBAM atbats and pitches table, when I try to add a salary column (for either pitchers or batters) to the merged table from the salaries table using the following code, I'm left with a significant number of rows with NULL values for the
UPDATE `atbats_pitches_python_new` t1 INNER JOIN salaries t2 ON (t2.mlb_name = t1.mlb_name AND t2.year = t1.year AND t2.team_id = t1.team_id) SET t1.salary=t2.salary
height and weight: I created a 'master' table from the Lahman files with height and weight columns; a table from Stattle with both height and weight columns; and the MLBAM atbats table with
b_height that contain batter heights.
b_height column from the 'atbats' table does contain heights, and I am currently running the query to add that column to the merged
atbats_pitches_python_new table, but after adding a
weight column from both the 'master' table and then the 'players_Stattle' table to add players data unique to each of the two tables, I'm again left with many NULL values for
Can someone please let me know what I should do differently with the files I have in order to include salary, height, and weight for all players in the merged atbats/pitches table and have no NULL or blank values for those three fields? Is there another source for that information that I'm not using? How are others handling this dilemma?
Thank you in advance.