From a067ff62b2fc9af62ecee4e5a3b372e0de77a57a Mon Sep 17 00:00:00 2001 From: filifa Date: Sat, 4 May 2024 20:59:32 -0500 Subject: [PATCH] change columns --- sql/batting.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/batting.sql b/sql/batting.sql index 1e76270..b1dc590 100644 --- a/sql/batting.sql +++ b/sql/batting.sql @@ -8,6 +8,9 @@ select * from "raw".batting; alter table batting drop column "lgID"; alter table batting drop column "teamID"; +alter table batting drop column "G"; +alter table batting drop column "G_batting"; + -- bbref doesn't say this guy played in 1911 delete from batting @@ -29,7 +32,6 @@ CREATE TABLE IF NOT EXISTS main."batting" ( "player" TEXT, "year" NUMERIC, "stint" NUMERIC, - "G" NUMERIC, "AB" NUMERIC, "R" NUMERIC, "H" NUMERIC check (H <= AB), @@ -46,6 +48,7 @@ CREATE TABLE IF NOT EXISTS main."batting" ( "SH" NUMERIC, "SF" NUMERIC, "GIDP" NUMERIC check (GIDP <= AB), + "G_old" NUMERIC check (GIDP <= AB), PRIMARY KEY("player","year","stint"), foreign key("year","player","stint") references "playerstints"("year","player","stint") );