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", "Angelique", "Kerber", "1988-01-18", "GER");
INSERT INTO "players" VALUES ("8", "Petra", "Kvitova", "1990-03-08", "CZE");
INSERT INTO "players" VALUES ("9", "Bianca", "Andreescu", "2000-06-16", "CAN");
INSERT INTO "players" VALUES ("10", "Iga", "Swiatek", "2001-05-31", "POL");
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 ("Angelique Kerber");
INSERT INTO "matches" VALUES ("Petra Kvitova");
INSERT INTO "matches" VALUES ("Bianca Andreescu");
INSERT INTO "matches" VALUES ("Iga Swiatek");
INSERT INTO "rankings" VALUES ("2023-01-01");
INSERT INTO "rankings" VALUES ("2023-06-01");
INSERT INTO "rankings" VALUES ("2024-01-01");