move appearances

This commit is contained in:
2024-01-27 20:05:47 -06:00
parent f47e756cc0
commit e1f572c122
3 changed files with 28 additions and 1 deletions

View File

@@ -259,4 +259,30 @@ CREATE TABLE IF NOT EXISTS "pitching" (
);
insert into pitching select distinct * from "transformed"."pitching";
CREATE TABLE IF NOT EXISTS "appearances" (
"year" NUMERIC,
"team" TEXT,
"player" TEXT,
"G_all" NUMERIC,
"GS" NUMERIC,
"G_batting" NUMERIC,
"G_defense" NUMERIC,
"G_p" NUMERIC,
"G_c" NUMERIC,
"G_1b" NUMERIC,
"G_2b" NUMERIC,
"G_3b" NUMERIC,
"G_ss" NUMERIC,
"G_lf" NUMERIC,
"G_cf" NUMERIC,
"G_rf" NUMERIC,
"G_of" NUMERIC,
"G_dh" NUMERIC,
"G_ph" NUMERIC,
"G_pr" NUMERIC,
PRIMARY KEY("year","team","player"),
foreign key("player") references "people"("ID"),
foreign key("year") references "seasons"("year")
);
COMMIT;