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,
"birth_date" DATE,
"country_code" TEXT,
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 ("Angelique Kerber", "Karolina Pliskova");
INSERT INTO "matches" VALUES ("Elina Svitolina", "Bianca Andreescu");
INSERT INTO "matches" VALUES ("Petra Kvitova", "Sofia Kenin");
INSERT INTO "matches" VALUES ("Victoria Azarenka", "Garbine Muguruza");
INSERT INTO "matches" VALUES ("Maria Sharapova", "Venus Williams");
INSERT INTO "matches" VALUES ("Coco Gauff", "Leylah Fernandez");
INSERT INTO "matches" VALUES ("Emma Raducanu", "Iga Swiatek");
INSERT INTO "matches" VALUES ("Ons Jabeur", "Aryna Sabalenka");
INSERT INTO "players" VALUES ("1", "Serena", "1981-09-26", "USA");
INSERT INTO "players" VALUES ("2", "Naomi", "1997-10-16", "JPN");
INSERT INTO "players" VALUES ("3", "Simona", "1991-09-27", "ROU");
INSERT INTO "players" VALUES ("4", "Ashleigh", "1996-04-24", "AUS");
INSERT INTO "players" VALUES ("5", "Angelique", "1988-01-18", "GER");
INSERT INTO "players" VALUES ("6", "Karolina", "1992-03-21", "CZE");
INSERT INTO "players" VALUES ("7", "Elina", "1994-09-12", "UKR");
INSERT INTO "players" VALUES ("8", "Bianca", "2000-06-16", "CAN");
INSERT INTO "players" VALUES ("9", "Petra", "1990-03-08", "CZE");
INSERT INTO "players" VALUES ("10", "Sofia", "1998-11-14", "USA");
INSERT INTO "players" VALUES ("11", "Victoria", "1989-07-31", "BLR");
INSERT INTO "players" VALUES ("12", "Garbine", "1993-10-08", "ESP");
INSERT INTO "players" VALUES ("13", "Maria", "1987-04-19", "RUS");
INSERT INTO "players" VALUES ("14", "Venus", "1980-06-17", "USA");
INSERT INTO "players" VALUES ("15", "Coco", "2004-03-13", "USA");
INSERT INTO "players" VALUES ("16", "Leylah", "2002-12-06", "CAN");
INSERT INTO "players" VALUES ("17", "Emma", "2002-11-13", "GBR");
INSERT INTO "players" VALUES ("18", "Iga", "2001-05-31", "POL");
INSERT INTO "players" VALUES ("19", "Ons", "1994-08-28", "TUN");
INSERT INTO "players" VALUES ("20", "Aryna", "1998-05-05", "BLR");
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");