remove divwin column
This commit is contained in:
parent
a4767f36d4
commit
ac9a713457
|
@ -578,7 +578,6 @@ CREATE TABLE IF NOT EXISTS "teamseasonshalf" (
|
|||
"year" NUMERIC,
|
||||
"team" TEXT,
|
||||
"Half" NUMERIC,
|
||||
"DivWin" TEXT,
|
||||
"Rank" NUMERIC,
|
||||
"G" NUMERIC,
|
||||
"W" NUMERIC,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue