lahmanlite/sql/halloffamereqs.sql

15 lines
318 B
PL/PgSQL

begin;
attach database 'baseball-raw.db' as 'raw';
create table if not exists "halloffamereqs" (
"yearID" numeric,
"votedBy" text,
"ballots" numeric,
"needed" numeric,
"needed_note" text
);
insert into halloffamereqs
select distinct yearid, votedby, ballots, needed, "needed_note"
from "raw".halloffame;
commit;