This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- function to calculate multi-year FIP for Retrosheet | |
-- This snippet supposes you have the Fangraphs GUTS table located with-in retrosheet. | |
-- Currently calculates career FIP. Just add a year parameter and it works for single season calculations. | |
DELIMITER // | |
CREATE FUNCTION FIP(pitcher VARCHAR(8)) | |
RETURNS DECIMAL(10,2) | |
BEGIN | |
DECLARE FIP DECIMAL(10,2); |