fix some data errors

This commit is contained in:
filifa 2024-05-04 20:58:28 -05:00
parent ea6f700748
commit cffc0d50a8
1 changed files with 46 additions and 1 deletions

View File

@ -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), (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); (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 update appearances
set set
"G_all" = nullif("G_all",''), "G_all" = nullif("G_all",''),
@ -58,7 +102,8 @@ CREATE TABLE IF NOT EXISTS "appearances" (
"G_lf" NUMERIC check ("G_lf" <= "G_all"), "G_lf" NUMERIC check ("G_lf" <= "G_all"),
"G_cf" NUMERIC check ("G_cf" <= "G_all"), "G_cf" NUMERIC check ("G_cf" <= "G_all"),
"G_rf" NUMERIC check ("G_rf" <= "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_dh" NUMERIC check ("G_dh" <= "G_all"),
"G_ph" NUMERIC check ("G_ph" <= "G_all"), "G_ph" NUMERIC check ("G_ph" <= "G_all"),
"G_pr" NUMERIC check ("G_pr" <= "G_all"), "G_pr" NUMERIC check ("G_pr" <= "G_all"),