lahmanlite/sql/franchises.sql

20 lines
355 B
MySQL
Raw Normal View History

pragma foreign_keys = 0;
2024-01-28 00:05:45 +00:00
begin;
2024-01-31 06:09:39 +00:00
attach database 'baseball-raw.db' as 'raw';
create temp table franchises as
select * from "raw".teamsfranchises;
CREATE TABLE IF NOT EXISTS main."franchises" (
"ID" TEXT,
"name" TEXT,
"active" TEXT,
"NAassoc" TEXT,
PRIMARY KEY("ID")
);
insert into main.franchises
select distinct * from temp."franchises";
2024-01-28 00:05:45 +00:00
commit;