remove divwin column

This commit is contained in:
Nick Griffey 2024-01-30 21:18:14 -06:00
parent a4767f36d4
commit ac9a713457
2 changed files with 5 additions and 5 deletions

View File

@ -578,7 +578,6 @@ CREATE TABLE IF NOT EXISTS "teamseasonshalf" (
"year" NUMERIC,
"team" TEXT,
"Half" NUMERIC,
"DivWin" TEXT,
"Rank" NUMERIC,
"G" NUMERIC,
"W" NUMERIC,

View File

@ -3,8 +3,12 @@ attach database 'baseball-raw.db' as 'raw';
alter table teamshalf rename to "teamseasonshalf";
alter table teamseasonshalf drop column "lgID";
alter table teamseasonshalf drop column "divID";
alter table teamseasonshalf drop column "DivWin";
insert into teamseasonshalf
select yearid, null, teamid, half, null, null, "rank", sum(g), sum(w), sum(l)
select yearid, teamid, half, "rank", sum(g), sum(w), sum(l)
from "raw".managershalf
where yearid = 1892
group by yearid, teamid, half;
@ -13,7 +17,4 @@ update teamseasonshalf
set teamid = 'WS9'
where yearid = 1892 and teamid = 'WAS';
alter table teamseasonshalf drop column "lgID";
alter table teamseasonshalf drop column "divID";
commit;