normalize halloffame

This commit is contained in:
Nick Griffey 2024-01-27 12:58:48 -06:00
parent dd968797d8
commit 02418b5f92
1 changed files with 18 additions and 0 deletions

18
sql/2nf/halloffame.sql Normal file
View File

@ -0,0 +1,18 @@
begin;
create table if not exists "halloffamereqs" (
"yearID" numeric,
"votedBy" text,
"ballots" numeric,
"needed" numeric,
"needed_note" text,
primary key("yearID","votedBy")
);
insert into halloffamereqs
select distinct yearid, votedby, ballots, needed, "needed_note"
from halloffame;
alter table halloffame drop column "ballots";
alter table halloffame drop column "needed";
alter table halloffame drop column "needed_note";
commit;