New Day Entry

INSERT INTO "wordleGames" ("gameDate", "mm", "word", "gameNum", "Gerry", "Frank", "Jule", "Bill") VALUES ('2024-04-03', '4', 'plait', '1019', '3', '3', '5', '3');

Replace Month Table. (one version of the data)

Drop table if exists apr24Games ;

create table apr24Games AS SELECT id, gameDate,word,gameNum,Gerry,Frank,Jule,Bill from wordleGames Where mm = 04 and gameNum > 1010 order by gameNum;

Only one version of the data

Drop table if exists apr24Stats;

Rebuild the table

Create table apr24Stats AS SELECT sum(Gerry) as GerryT, sum(Frank) as FrankT, sum(Jule) as JuleT, sum(Bill) as BillT from apr24Games;

Add some Columns to the table

One cloumn at a time!

alter table apr24Stats ADD COLUMN Best int;

alter table apr24Stats ADD COLUMN GerryMT varchar(50);

alter table apr24Stats ADD COLUMN FrankMT varchar(50);

alter table apr24Stats ADD COLUMN JuleMT varchar(50);

alter table apr24Stats ADD COLUMN BillMT varchar(50);

Populate the new fields with data. Use if ststement to select Best score.

update apr24Stats set Best = min(GerryT, FrankT, JuleT, BillT);

update apr24Stats set GerryMT = iif(GerryT=Best,("Leader"||' '||Best), GerryT), FrankMT = iif(FrankT=Best,("Leader"||' '||Best), FrankT), JuleMT = iif(JuleT=Best, ("Leader"||' '||Best), JuleT), BillMT = iif(BillT=Best, ("Leader"||' '||Best), BillT);

Link to Stacks - Using the data in Stacks