PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "matches" (
"loser_name" TEXT,
"winner_name" TEXT
);

CREATE TABLE "players" (
"player_id" INT,
"first_name" TEXT,
"last_name" TEXT,
"hand" TEXT,
"birth_date" DATE,
PRIMARY KEY ("player_id")
);

CREATE TABLE "rankings" (
"ranking_date" DATE
);





INSERT INTO "matches" VALUES ("Serena Williams", "Naomi Osaka");
INSERT INTO "matches" VALUES ("Simona Halep", "Ashleigh Barty");
INSERT INTO "matches" VALUES ("Petra Kvitova", "Karolina Pliskova");
INSERT INTO "matches" VALUES ("Angelique Kerber", "Elina Svitolina");
INSERT INTO "matches" VALUES ("Victoria Azarenka", "Maria Sharapova");
INSERT INTO "matches" VALUES ("Venus Williams", "Coco Gauff");
INSERT INTO "matches" VALUES ("Bianca Andreescu", "Sofia Kenin");
INSERT INTO "matches" VALUES ("Garbine Muguruza", "Aryna Sabalenka");
INSERT INTO "matches" VALUES ("Sloane Stephens", "Madison Keys");
INSERT INTO "matches" VALUES ("Johanna Konta", "Belinda Bencic");
INSERT INTO "players" VALUES ("1", "Serena", "Williams", "R", "1981-09-26");
INSERT INTO "players" VALUES ("2", "Naomi", "Osaka", "R", "1997-10-16");
INSERT INTO "players" VALUES ("3", "Simona", "Halep", "R", "1991-09-27");
INSERT INTO "players" VALUES ("4", "Ashleigh", "Barty", "R", "1996-04-24");
INSERT INTO "players" VALUES ("5", "Petra", "Kvitova", "L", "1990-03-08");
INSERT INTO "players" VALUES ("6", "Karolina", "Pliskova", "R", "1992-03-21");
INSERT INTO "players" VALUES ("7", "Angelique", "Kerber", "L", "1988-01-18");
INSERT INTO "players" VALUES ("8", "Elina", "Svitolina", "R", "1994-09-12");
INSERT INTO "players" VALUES ("9", "Victoria", "Azarenka", "R", "1989-07-31");
INSERT INTO "players" VALUES ("10", "Maria", "Sharapova", "R", "1987-04-19");
INSERT INTO "players" VALUES ("11", "Venus", "Williams", "R", "1980-06-17");
INSERT INTO "players" VALUES ("12", "Coco", "Gauff", "R", "2004-03-13");
INSERT INTO "players" VALUES ("13", "Bianca", "Andreescu", "R", "2000-06-16");
INSERT INTO "players" VALUES ("14", "Sofia", "Kenin", "R", "1998-11-14");
INSERT INTO "players" VALUES ("15", "Garbine", "Muguruza", "R", "1993-10-08");
INSERT INTO "players" VALUES ("16", "Aryna", "Sabalenka", "R", "1998-05-05");
INSERT INTO "players" VALUES ("17", "Sloane", "Stephens", "R", "1993-03-20");
INSERT INTO "players" VALUES ("18", "Madison", "Keys", "R", "1995-02-04");
INSERT INTO "players" VALUES ("19", "Johanna", "Konta", "R", "1991-05-17");
INSERT INTO "players" VALUES ("20", "Belinda", "Bencic", "R", "1997-03-10");
INSERT INTO "players" VALUES ("21", "Barbora", "Krejcikova", "R", "1995-12-18");
INSERT INTO "players" VALUES ("22", "Iga", "Swiatek", "R", "2001-05-31");
INSERT INTO "players" VALUES ("23", "Ons", "Jabeur", "R", "1994-08-28");
INSERT INTO "players" VALUES ("24", "Jessica", "Pegula", "R", "1994-02-24");
INSERT INTO "players" VALUES ("25", "Danielle", "Collins", "R", "1993-12-13");
INSERT INTO "players" VALUES ("26", "Leylah", "Fernandez", "L", "2002-09-06");
INSERT INTO "players" VALUES ("27", "Emma", "Raducanu", "R", "2002-11-13");
INSERT INTO "players" VALUES ("28", "Daria", "Kasatkina", "R", "1997-05-07");
INSERT INTO "players" VALUES ("29", "Veronika", "Kudermetova", "R", "1997-04-11");
INSERT INTO "players" VALUES ("30", "Beatriz", "Haddad Maia", "L", "1996-05-11");
INSERT INTO "players" VALUES ("31", "Caroline", "Garcia", "R", "1993-10-17");
INSERT INTO "players" VALUES ("32", "Elena", "Rybakina", "R", "1999-06-17");
INSERT INTO "players" VALUES ("33", "Aryna", "Sabalenka", "R", "1998-05-05");
INSERT INTO "players" VALUES ("34", "Marketa", "Vondrousova", "L", "1999-06-28");
INSERT INTO "players" VALUES ("35", "Ajla", "Tomljanovic", "R", "1993-05-07");
INSERT INTO "players" VALUES ("36", "Donna", "Vekic", "R", "1996-06-28");
INSERT INTO "players" VALUES ("37", "Victoria", "Azarenka", "R", "1989-07-31");
INSERT INTO "players" VALUES ("38", "Madison", "Keys", "R", "1995-02-04");
INSERT INTO "players" VALUES ("39", "Elise", "Mertens", "R", "1995-11-17");
INSERT INTO "players" VALUES ("40", "Jelena", "Ostapenko", "R", "1997-06-08");
INSERT INTO "rankings" VALUES ("2023-01-01");
INSERT INTO "rankings" VALUES ("2023-01-08");
INSERT INTO "rankings" VALUES ("2023-01-15");
INSERT INTO "rankings" VALUES ("2023-01-22");
INSERT INTO "rankings" VALUES ("2023-01-29");
INSERT INTO "rankings" VALUES ("2023-02-05");
INSERT INTO "rankings" VALUES ("2023-02-12");
INSERT INTO "rankings" VALUES ("2023-02-19");
INSERT INTO "rankings" VALUES ("2023-02-26");
INSERT INTO "rankings" VALUES ("2023-03-05");