lahmanlite/sql/teamcodes.sql

19 lines
363 B
MySQL
Raw Normal View History

2024-01-28 03:19:48 +00:00
begin;
attach database 'baseball-raw.db' as 'raw';
create table if not exists teamcodes (
"team" text,
"franchise" text
);
insert into teamcodes
select distinct teamid, franchid from "raw"."teams";
update teamcodes
set team = 'WS9'
where team = 'WAS' and franchise = 'WAS';
update teamcodes
set team = 'PHP'
where team = 'PH4' and franchise = 'PHQ';
commit;