change filename to lahman

This commit is contained in:
filifa 2024-05-04 22:11:20 -05:00
parent 0d085fde2a
commit a100af3960
38 changed files with 108 additions and 108 deletions

142
Makefile
View File

@ -1,75 +1,75 @@
.PHONY: db .PHONY: db
db: baseball.db db: lahman.db
baseball.db: baseball-raw.db sql/awards.sql sql/franchises.sql sql/teamseasons.sql sql/seasons.sql sql/parks.sql sql/collegeplaying.sql sql/schools.sql sql/people.sql sql/salaries.sql sql/batting.sql sql/pitching.sql sql/fielding.sql sql/appearances.sql sql/homegames.sql sql/seriespost.sql sql/fieldingofsplit.sql sql/teams.sql sql/leagues.sql sql/managers.sql sql/awardsmanagers.sql sql/battingpost.sql sql/fieldingpost.sql sql/pitchingpost.sql sql/appearancespost.sql sql/awardsshareplayers.sql sql/yearlyawards.sql sql/halloffame.sql sql/awardsplayers.sql sql/parkaliases.sql sql/teamseasonshalf.sql sql/managershalf.sql sql/allstarstartingpos.sql sql/allstars.sql sql/allstargames.sql sql/playerstints.sql lahman.db: lahman-raw.db sql/awards.sql sql/franchises.sql sql/teamseasons.sql sql/seasons.sql sql/parks.sql sql/collegeplaying.sql sql/schools.sql sql/people.sql sql/salaries.sql sql/batting.sql sql/pitching.sql sql/fielding.sql sql/appearances.sql sql/homegames.sql sql/seriespost.sql sql/fieldingofsplit.sql sql/teams.sql sql/leagues.sql sql/managers.sql sql/awardsmanagers.sql sql/battingpost.sql sql/fieldingpost.sql sql/pitchingpost.sql sql/appearancespost.sql sql/awardsshareplayers.sql sql/yearlyawards.sql sql/halloffame.sql sql/awardsplayers.sql sql/parkaliases.sql sql/teamseasonshalf.sql sql/managershalf.sql sql/allstarstartingpos.sql sql/allstars.sql sql/allstargames.sql sql/playerstints.sql
rm -f baseball.db rm -f lahman.db
cat sql/allstargames.sql | sqlite3 baseball.db cat sql/allstargames.sql | sqlite3 lahman.db
cat sql/allstars.sql | sqlite3 baseball.db cat sql/allstars.sql | sqlite3 lahman.db
cat sql/allstarstartingpos.sql | sqlite3 baseball.db cat sql/allstarstartingpos.sql | sqlite3 lahman.db
cat sql/appearancespost.sql | sqlite3 baseball.db cat sql/appearancespost.sql | sqlite3 lahman.db
cat sql/appearances.sql | sqlite3 baseball.db cat sql/appearances.sql | sqlite3 lahman.db
cat sql/awardsmanagers.sql | sqlite3 baseball.db cat sql/awardsmanagers.sql | sqlite3 lahman.db
cat sql/awardsplayers.sql | sqlite3 baseball.db cat sql/awardsplayers.sql | sqlite3 lahman.db
cat sql/awardssharemanagers.sql | sqlite3 baseball.db cat sql/awardssharemanagers.sql | sqlite3 lahman.db
cat sql/awardsshareplayers.sql | sqlite3 baseball.db cat sql/awardsshareplayers.sql | sqlite3 lahman.db
cat sql/awards.sql | sqlite3 baseball.db cat sql/awards.sql | sqlite3 lahman.db
cat sql/battingpost.sql | sqlite3 baseball.db cat sql/battingpost.sql | sqlite3 lahman.db
cat sql/batting.sql | sqlite3 baseball.db cat sql/batting.sql | sqlite3 lahman.db
cat sql/collegeplaying.sql | sqlite3 baseball.db cat sql/collegeplaying.sql | sqlite3 lahman.db
cat sql/fieldingofsplit.sql | sqlite3 baseball.db cat sql/fieldingofsplit.sql | sqlite3 lahman.db
cat sql/fieldingof.sql | sqlite3 baseball.db cat sql/fieldingof.sql | sqlite3 lahman.db
cat sql/fieldingpost.sql | sqlite3 baseball.db cat sql/fieldingpost.sql | sqlite3 lahman.db
cat sql/fielding.sql | sqlite3 baseball.db cat sql/fielding.sql | sqlite3 lahman.db
cat sql/franchises.sql | sqlite3 baseball.db cat sql/franchises.sql | sqlite3 lahman.db
cat sql/halloffamereqs.sql | sqlite3 baseball.db cat sql/halloffamereqs.sql | sqlite3 lahman.db
cat sql/halloffame.sql | sqlite3 baseball.db cat sql/halloffame.sql | sqlite3 lahman.db
cat sql/homegames.sql | sqlite3 baseball.db cat sql/homegames.sql | sqlite3 lahman.db
cat sql/leagues.sql | sqlite3 baseball.db cat sql/leagues.sql | sqlite3 lahman.db
cat sql/managershalf.sql | sqlite3 baseball.db cat sql/managershalf.sql | sqlite3 lahman.db
cat sql/managers.sql | sqlite3 baseball.db cat sql/managers.sql | sqlite3 lahman.db
cat sql/parkaliases.sql | sqlite3 baseball.db cat sql/parkaliases.sql | sqlite3 lahman.db
cat sql/parks.sql | sqlite3 baseball.db cat sql/parks.sql | sqlite3 lahman.db
cat sql/people.sql | sqlite3 baseball.db cat sql/people.sql | sqlite3 lahman.db
cat sql/pitchingpost.sql | sqlite3 baseball.db cat sql/pitchingpost.sql | sqlite3 lahman.db
cat sql/pitching.sql | sqlite3 baseball.db cat sql/pitching.sql | sqlite3 lahman.db
cat sql/playerstints.sql | sqlite3 baseball.db cat sql/playerstints.sql | sqlite3 lahman.db
cat sql/salaries.sql | sqlite3 baseball.db cat sql/salaries.sql | sqlite3 lahman.db
cat sql/schools.sql | sqlite3 baseball.db cat sql/schools.sql | sqlite3 lahman.db
cat sql/seasons.sql | sqlite3 baseball.db cat sql/seasons.sql | sqlite3 lahman.db
cat sql/seriespost.sql | sqlite3 baseball.db cat sql/seriespost.sql | sqlite3 lahman.db
cat sql/teamseasonshalf.sql | sqlite3 baseball.db cat sql/teamseasonshalf.sql | sqlite3 lahman.db
cat sql/teamseasons.sql | sqlite3 baseball.db cat sql/teamseasons.sql | sqlite3 lahman.db
cat sql/teams.sql | sqlite3 baseball.db cat sql/teams.sql | sqlite3 lahman.db
cat sql/yearlyawards.sql | sqlite3 baseball.db cat sql/yearlyawards.sql | sqlite3 lahman.db
sqlite3 baseball.db "VACUUM" sqlite3 lahman.db "VACUUM"
baseball-raw.db: lahman-raw.db:
rm -f baseball-raw.db rm -f lahman-raw.db
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AllstarFull.csv allstarfull" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AllstarFull.csv allstarfull"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Appearances.csv appearances" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Appearances.csv appearances"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Batting.csv batting" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Batting.csv batting"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/BattingPost.csv battingpost" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/BattingPost.csv battingpost"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Fielding.csv fielding" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Fielding.csv fielding"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingOF.csv fieldingof" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingOF.csv fieldingof"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingOFsplit.csv fieldingofsplit" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingOFsplit.csv fieldingofsplit"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingPost.csv fieldingpost" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/FieldingPost.csv fieldingpost"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/HomeGames.csv homegames" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/HomeGames.csv homegames"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Managers.csv managers" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Managers.csv managers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/ManagersHalf.csv managershalf" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/ManagersHalf.csv managershalf"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Parks.csv parks" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Parks.csv parks"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/People.csv people" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/People.csv people"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Pitching.csv pitching" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Pitching.csv pitching"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/PitchingPost.csv pitchingpost" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/PitchingPost.csv pitchingpost"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/SeriesPost.csv seriespost" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/SeriesPost.csv seriespost"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Teams.csv teams" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Teams.csv teams"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/TeamsFranchises.csv teamsfranchises" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/TeamsFranchises.csv teamsfranchises"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/TeamsHalf.csv teamshalf" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/TeamsHalf.csv teamshalf"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsManagers.csv awardsmanagers" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsManagers.csv awardsmanagers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsPlayers.csv awardsplayers" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsPlayers.csv awardsplayers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsShareManagers.csv awardssharemanagers" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsShareManagers.csv awardssharemanagers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsSharePlayers.csv awardsshareplayers" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/AwardsSharePlayers.csv awardsshareplayers"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/CollegePlaying.csv collegeplaying" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/CollegePlaying.csv collegeplaying"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/HallOfFame.csv halloffame" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/HallOfFame.csv halloffame"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Salaries.csv salaries" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Salaries.csv salaries"
sqlite3 baseball-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Schools.csv schools" sqlite3 lahman-raw.db ".import --csv $(BBDBSQLITE_CSV_DIR)/Schools.csv schools"

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists "allstargames" ( create temp table if not exists "allstargames" (
"year" numeric, "year" numeric,
"gameNum" numeric, "gameNum" numeric,

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists "allstars" ( create temp table if not exists "allstars" (
"player" text, "player" text,
"year" text, "year" text,

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
CREATE TEMP TABLE "allstarstartingpos" ( CREATE TEMP TABLE "allstarstartingpos" (
"player" NUMERIC, "player" NUMERIC,

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table appearances as create temp table appearances as
select * from "raw".appearances; select * from "raw".appearances;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists appearancespost ( create temp table if not exists appearancespost (
"year" numeric, "year" numeric,

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists "awards" ( create temp table if not exists "awards" (
"ID" text "ID" text
); );

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table "awardsmanagers" as create temp table "awardsmanagers" as
select * from "raw".awardsmanagers; select * from "raw".awardsmanagers;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table awardsplayers as create temp table awardsplayers as
select * from "raw".awardsplayers; select * from "raw".awardsplayers;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
CREATE TABLE IF NOT EXISTS "awardssharemanagers" ( CREATE TABLE IF NOT EXISTS "awardssharemanagers" (
"award" TEXT, "award" TEXT,

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table awardsshareplayers as create temp table awardsshareplayers as
select * from "raw".awardsshareplayers; select * from "raw".awardsshareplayers;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table batting as create temp table batting as
select * from "raw".batting; select * from "raw".batting;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table battingpost as create temp table battingpost as
select * from "raw".battingpost; select * from "raw".battingpost;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table collegeplaying as create temp table collegeplaying as
select * from "raw".collegeplaying; select * from "raw".collegeplaying;

View File

@ -6,7 +6,7 @@ pragma foreign_keys = 0;
pragma ignore_check_constraints = 1; pragma ignore_check_constraints = 1;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table fielding as create temp table fielding as
select * from "raw".fielding; select * from "raw".fielding;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table fieldingof as create temp table fieldingof as
select * from "raw".fieldingof; select * from "raw".fieldingof;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table fieldingofsplit as create temp table fieldingofsplit as
select * from fieldingofsplit; select * from fieldingofsplit;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table fieldingpost as create temp table fieldingpost as
select * from "raw".fieldingpost; select * from "raw".fieldingpost;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table franchises as create temp table franchises as
select * from "raw".teamsfranchises; select * from "raw".teamsfranchises;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table halloffame as create temp table halloffame as
select * from "raw".halloffame; select * from "raw".halloffame;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table homegames as create temp table homegames as
select * from "raw".homegames; select * from "raw".homegames;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists "leagues" ( create temp table if not exists "leagues" (
"ID" text, "ID" text,

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table managers as create temp table managers as
select * from "raw".managers; select * from "raw".managers;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table managershalf as create temp table managershalf as
select * from "raw".managershalf; select * from "raw".managershalf;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists "parkaliases" ( create temp table if not exists "parkaliases" (
"parkID" text, "parkID" text,

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table parks as create temp table parks as
select * from "raw".parks; select * from "raw".parks;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table people as create temp table people as
select * from "raw".people; select * from "raw".people;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table pitching as create temp table pitching as
select * from "raw".pitching; select * from "raw".pitching;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table pitchingpost as create temp table pitchingpost as
select * from "raw".pitchingpost; select * from "raw".pitchingpost;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists "playerstints" ( create temp table if not exists "playerstints" (
"player" text, "player" text,

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table salaries as create temp table salaries as
select * from "raw".salaries; select * from "raw".salaries;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table schools as create temp table schools as
select * from "raw".schools; select * from "raw".schools;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists "seasons" ( create temp table if not exists "seasons" (
"year" text "year" text
); );

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table seriespost as create temp table seriespost as
select * from "raw".seriespost; select * from "raw".seriespost;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists teams ( create temp table if not exists teams (
"ID" text, "ID" text,
"franchise" text "franchise" text

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table teamseasons as create temp table teamseasons as
select * from teams; select * from teams;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table teamseasonshalf as create temp table teamseasonshalf as
select * from "raw".teamshalf; select * from "raw".teamshalf;

View File

@ -1,7 +1,7 @@
pragma foreign_keys = 0; pragma foreign_keys = 0;
begin; begin;
attach database 'baseball-raw.db' as 'raw'; attach database 'lahman-raw.db' as 'raw';
create temp table if not exists "yearlyawards" ( create temp table if not exists "yearlyawards" (
"year" numeric, "year" numeric,
"award" text, "award" text,