Skip to content

Instantly share code, notes, and snippets.

@LeeZee1
LeeZee1 / Retrosheet Multi-Year FIP
Created May 23, 2016 05:02 — forked from SpencerBingol/Retrosheet Multi-Year FIP
[MYSQL] Multi-year FIP Function for Retrosheet
-- 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);