remove divwin column
This commit is contained in:
parent
a4767f36d4
commit
ac9a713457
|
@ -578,7 +578,6 @@ CREATE TABLE IF NOT EXISTS "teamseasonshalf" (
|
||||||
"year" NUMERIC,
|
"year" NUMERIC,
|
||||||
"team" TEXT,
|
"team" TEXT,
|
||||||
"Half" NUMERIC,
|
"Half" NUMERIC,
|
||||||
"DivWin" TEXT,
|
|
||||||
"Rank" NUMERIC,
|
"Rank" NUMERIC,
|
||||||
"G" NUMERIC,
|
"G" NUMERIC,
|
||||||
"W" NUMERIC,
|
"W" NUMERIC,
|
||||||
|
|
|
@ -3,8 +3,12 @@ attach database 'baseball-raw.db' as 'raw';
|
||||||
|
|
||||||
alter table teamshalf rename to "teamseasonshalf";
|
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
|
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
|
from "raw".managershalf
|
||||||
where yearid = 1892
|
where yearid = 1892
|
||||||
group by yearid, teamid, half;
|
group by yearid, teamid, half;
|
||||||
|
@ -13,7 +17,4 @@ update teamseasonshalf
|
||||||
set teamid = 'WS9'
|
set teamid = 'WS9'
|
||||||
where yearid = 1892 and teamid = 'WAS';
|
where yearid = 1892 and teamid = 'WAS';
|
||||||
|
|
||||||
alter table teamseasonshalf drop column "lgID";
|
|
||||||
alter table teamseasonshalf drop column "divID";
|
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
Loading…
Reference in New Issue