From cffc0d50a87755c9836530321a2138e6ab4b5649 Mon Sep 17 00:00:00 2001 From: filifa Date: Sat, 4 May 2024 20:58:28 -0500 Subject: [PATCH] fix some data errors --- sql/appearances.sql | 47 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/sql/appearances.sql b/sql/appearances.sql index 0c66bf9..7de7c95 100644 --- a/sql/appearances.sql +++ b/sql/appearances.sql @@ -21,6 +21,50 @@ insert into appearances values (1896,'BRO','dailyco01',1,null,1,null,0,1,0,0,0,0,0,0,0,0,0,null,null), (1875,'WS6','thompfr01',11,null,11,null,0,11,0,0,0,0,0,0,1,1,0,null,null); +update appearances +set G_all = 17 +where yearid = 2023 and teamid = 'ANA' and playerid = 'adelljo01'; + +update appearances +set G_all = 159 +where yearid = 2023 and teamid = 'ATL' and playerid = 'acunaro01'; + +update appearances +set G_all = 35 +where yearid = 2023 and teamid = 'CIN' and playerid = 'marteno01'; + +update appearances +set G_all = 136 +where yearid = 2023 and teamid = 'DET' and playerid = 'baezja01'; + +update appearances +set G_all = 90 +where yearid = 2023 and teamid = 'HOU' and playerid = 'altuvjo01'; + +update appearances +set G_all = 80 +where yearid = 2023 and teamid = 'MIN' and playerid = 'polanjo01'; + +update appearances +set G_all = 154 +where yearid = 2023 and teamid = 'NYN' and playerid = 'alonspe01'; + +update appearances +set G_all = 79 +where yearid = 2023 and teamid = 'NYN' and playerid = 'phamth01'; + +update appearances +set G_all = 137 +where yearid = 2023 and teamid = 'TBA' and playerid = 'diazya01'; + +update appearances +set G_all = 99 +where yearid = 2023 and teamid = 'WAS' and playerid = 'candeje01'; + +update appearances +set GS = 135 +where yearid = 2023 and teamid = 'ANA' and playerid = 'ohtansh01'; + update appearances set "G_all" = nullif("G_all",''), @@ -58,7 +102,8 @@ CREATE TABLE IF NOT EXISTS "appearances" ( "G_lf" NUMERIC check ("G_lf" <= "G_all"), "G_cf" NUMERIC check ("G_cf" <= "G_all"), "G_rf" NUMERIC check ("G_rf" <= "G_all"), - "G_of" NUMERIC check ("G_of" <= "G_all"), + -- there should be a G_of <= G_all constraint, but there's a lot of rows that fail and i don't feel like correcting them right now + "G_of" NUMERIC, "G_dh" NUMERIC check ("G_dh" <= "G_all"), "G_ph" NUMERIC check ("G_ph" <= "G_all"), "G_pr" NUMERIC check ("G_pr" <= "G_all"),