2024-01-26 03:08:32 +00:00
|
|
|
begin;
|
2024-01-31 06:09:39 +00:00
|
|
|
attach database 'baseball-raw.db' as 'raw';
|
|
|
|
|
|
|
|
create temp table schools as
|
|
|
|
select * from "raw".schools;
|
|
|
|
|
2024-01-26 03:08:32 +00:00
|
|
|
-- insert some missing schools
|
|
|
|
insert into schools values
|
|
|
|
('txutper', 'University of Texas Permian Basin', 'Odessa', 'TX', 'USA'),
|
|
|
|
('txrange', 'Ranger College', 'Ranger', 'TX', 'USA');
|
2024-01-31 06:09:39 +00:00
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS main."schools" (
|
|
|
|
"ID" TEXT,
|
|
|
|
"name_full" TEXT,
|
|
|
|
"city" TEXT,
|
|
|
|
"state" TEXT,
|
|
|
|
"country" TEXT,
|
|
|
|
PRIMARY KEY("ID")
|
|
|
|
);
|
|
|
|
|
|
|
|
insert into main.schools select distinct * from temp."schools";
|
2024-01-26 03:08:32 +00:00
|
|
|
commit;
|