16 lines
313 B
PL/PgSQL
16 lines
313 B
PL/PgSQL
begin;
|
|
attach database 'baseball-raw.db' as 'raw';
|
|
create table if not exists "yearlyawards" (
|
|
"year" numeric,
|
|
"award" text,
|
|
"league" text
|
|
);
|
|
|
|
insert into yearlyawards
|
|
select distinct yearid, awardid, lgID
|
|
from "raw".awardsmanagers
|
|
union
|
|
select distinct yearid, awardid, lgID
|
|
from "raw".awardsplayers;
|
|
commit;
|