lahmanlite/sql/fieldingof.sql

18 lines
424 B
MySQL
Raw Normal View History

pragma foreign_keys = 0;
2024-01-31 06:09:39 +00:00
begin;
attach database 'baseball-raw.db' as 'raw';
CREATE TABLE IF NOT EXISTS "fieldingof" (
"player" TEXT,
"year" NUMERIC,
"stint" NUMERIC,
"Glf" NUMERIC,
"Gcf" NUMERIC,
"Grf" NUMERIC,
PRIMARY KEY("player","year","stint"),
foreign key("year","player","stint") references "playerstints"("year","player","stint")
);
insert into fieldingof select distinct * from "raw"."fieldingof";
commit;