begin;
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";
commit;
