lahmanlite/sql/people.sql

33 lines
627 B
MySQL
Raw Normal View History

2024-01-27 22:42:08 +00:00
BEGIN;
attach database 'baseball-raw.db' as 'raw';
CREATE TABLE "people" (
"playerID" text,
"birthYear" NUMERIC,
"birthMonth" NUMERIC,
"birthDay" NUMERIC,
"birthCountry" text,
"birthState" text,
"birthCity" text,
"deathYear" text,
"deathMonth" text,
"deathDay" text,
"deathCountry" text,
"deathState" text,
"deathCity" text,
"nameFirst" text,
"nameLast" text,
"nameGiven" text,
"weight" NUMERIC,
"height" NUMERIC,
"bats" text,
"throws" text,
"debut" text,
"finalGame" text,
"retroID" text,
"bbrefID" text,
primary key("playerID")
);
INSERT INTO "people" SELECT DISTINCT * FROM "raw"."people";
COMMIT;