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
);

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

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





INSERT INTO "players" VALUES ("1", "Serena", "Williams", "1981-09-26", "USA");
INSERT INTO "players" VALUES ("2", "Venus", "Williams", "1980-06-17", "USA");
INSERT INTO "players" VALUES ("3", "Maria", "Sharapova", "1987-04-19", "RUS");
INSERT INTO "players" VALUES ("4", "Simona", "Halep", "1991-09-27", "ROU");
INSERT INTO "players" VALUES ("5", "Naomi", "Osaka", "1997-10-16", "JPN");
INSERT INTO "players" VALUES ("6", "Ashleigh", "Barty", "1996-04-24", "AUS");
INSERT INTO "players" VALUES ("7", "Petra", "Kvitova", "1990-03-08", "CZE");
INSERT INTO "players" VALUES ("8", "Angelique", "Kerber", "1988-01-18", "GER");
INSERT INTO "players" VALUES ("9", "Caroline", "Wozniacki", "1990-07-11", "DEN");
INSERT INTO "players" VALUES ("10", "Sloane", "Stephens", "1993-03-20", "USA");
INSERT INTO "players" VALUES ("11", "Bianca", "Andreescu", "2000-06-16", "CAN");
INSERT INTO "players" VALUES ("12", "Iga", "Swiatek", "2001-05-31", "POL");
INSERT INTO "players" VALUES ("13", "Madison", "Keys", "1995-02-17", "USA");
INSERT INTO "players" VALUES ("14", "Elena", "Rybakina", "1999-06-17", "KAZ");
INSERT INTO "players" VALUES ("15", "Victoria", "Azarenka", "1989-07-31", "BLR");
INSERT INTO "players" VALUES ("16", "Naomi", "Broady", "1990-10-28", "GBR");
INSERT INTO "players" VALUES ("17", "Daria", "Kasatkina", "1997-05-07", "RUS");
INSERT INTO "players" VALUES ("18", "Barbora", "Krejcikova", "1995-12-18", "CZE");
INSERT INTO "players" VALUES ("19", "Coco", "Gauff", "2004-03-13", "USA");
INSERT INTO "players" VALUES ("20", "Leylah", "Fernandez", "2002-09-06", "CAN");
INSERT INTO "players" VALUES ("21", "Player", "NoBirthDate", "NULL", "USA");
INSERT INTO "players" VALUES ("22", "Twin1", "SameBirth", "1990-07-11", "USA");
INSERT INTO "players" VALUES ("23", "Twin2", "SameBirth", "1990-07-11", "USA");
INSERT INTO "matches" VALUES ("Serena Williams");
INSERT INTO "matches" VALUES ("Venus Williams");
INSERT INTO "matches" VALUES ("Maria Sharapova");
INSERT INTO "matches" VALUES ("Simona Halep");
INSERT INTO "matches" VALUES ("Naomi Osaka");
INSERT INTO "matches" VALUES ("Ashleigh Barty");
INSERT INTO "matches" VALUES ("Petra Kvitova");
INSERT INTO "matches" VALUES ("Angelique Kerber");
INSERT INTO "matches" VALUES ("Caroline Wozniacki");
INSERT INTO "matches" VALUES ("Sloane Stephens");
INSERT INTO "matches" VALUES ("Bianca Andreescu");
INSERT INTO "matches" VALUES ("Iga Swiatek");
INSERT INTO "matches" VALUES ("Madison Keys");
INSERT INTO "matches" VALUES ("Elena Rybakina");
INSERT INTO "matches" VALUES ("Victoria Azarenka");
INSERT INTO "matches" VALUES ("Naomi Broady");
INSERT INTO "matches" VALUES ("Daria Kasatkina");
INSERT INTO "matches" VALUES ("Barbora Krejcikova");
INSERT INTO "matches" VALUES ("Coco Gauff");
INSERT INTO "matches" VALUES ("Leylah Fernandez");
INSERT INTO "matches" VALUES ("Player NoBirthDate");
INSERT INTO "matches" VALUES ("Twin1 SameBirth");
INSERT INTO "matches" VALUES ("Twin2 SameBirth");
INSERT INTO "rankings" VALUES ("2023-01-01");
INSERT INTO "rankings" VALUES ("2023-06-01");
INSERT INTO "rankings" VALUES ("2024-01-01");