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 UNIQUE,
"first_name" TEXT,
"last_name" TEXT,
PRIMARY KEY ("player_id")
);

CREATE TABLE "rankings" (
"player_id" INT,
"ranking_points" INT,
FOREIGN KEY ("player_id") REFERENCES "players"("player_id")
);





INSERT INTO "players" VALUES ("1", "Serena", "Williams");
INSERT INTO "players" VALUES ("2", "Venus", "Williams");
INSERT INTO "players" VALUES ("3", "Maria", "Sharapova");
INSERT INTO "players" VALUES ("4", "Simona", "Halep");
INSERT INTO "players" VALUES ("5", "Naomi", "Osaka");
INSERT INTO "players" VALUES ("6", "Ashleigh", "Barty");
INSERT INTO "players" VALUES ("7", "Petra", "Kvitova");
INSERT INTO "players" VALUES ("8", "Angelique", "Kerber");
INSERT INTO "players" VALUES ("9", "Caroline", "Wozniacki");
INSERT INTO "players" VALUES ("10", "Victoria", "Azarenka");
INSERT INTO "players" VALUES ("11", "Garbine", "Muguruza");
INSERT INTO "players" VALUES ("12", "Sloane", "Stephens");
INSERT INTO "players" VALUES ("13", "Elina", "Svitolina");
INSERT INTO "players" VALUES ("14", "Karolina", "Pliskova");
INSERT INTO "players" VALUES ("15", "Aryna", "Sabalenka");
INSERT INTO "matches" VALUES ("Maria Sharapova", "Serena Williams");
INSERT INTO "matches" VALUES ("Venus Williams", "Maria Sharapova");
INSERT INTO "matches" VALUES ("Simona Halep", "Serena Williams");
INSERT INTO "matches" VALUES ("Naomi Osaka", "Simona Halep");
INSERT INTO "matches" VALUES ("Ashleigh Barty", "Naomi Osaka");
INSERT INTO "matches" VALUES ("Petra Kvitova", "Ashleigh Barty");
INSERT INTO "matches" VALUES ("Angelique Kerber", "Petra Kvitova");
INSERT INTO "matches" VALUES ("Caroline Wozniacki", "Angelique Kerber");
INSERT INTO "matches" VALUES ("Victoria Azarenka", "Caroline Wozniacki");
INSERT INTO "matches" VALUES ("Garbine Muguruza", "Victoria Azarenka");
INSERT INTO "matches" VALUES ("Sloane Stephens", "Garbine Muguruza");
INSERT INTO "matches" VALUES ("Elina Svitolina", "Sloane Stephens");
INSERT INTO "matches" VALUES ("Karolina Pliskova", "Elina Svitolina");
INSERT INTO "matches" VALUES ("Aryna Sabalenka", "Karolina Pliskova");
INSERT INTO "matches" VALUES ("Serena Williams", "Naomi Osaka");
INSERT INTO "matches" VALUES ("Simona Halep", "Ashleigh Barty");
INSERT INTO "matches" VALUES ("Maria Sharapova", "Petra Kvitova");
INSERT INTO "matches" VALUES ("Venus Williams", "Angelique Kerber");
INSERT INTO "matches" VALUES ("Serena Williams", "Caroline Wozniacki");
INSERT INTO "matches" VALUES ("Naomi Osaka", "Victoria Azarenka");
INSERT INTO "rankings" VALUES ("1", "8000");
INSERT INTO "rankings" VALUES ("2", "4500");
INSERT INTO "rankings" VALUES ("3", "3000");
INSERT INTO "rankings" VALUES ("4", "7500");
INSERT INTO "rankings" VALUES ("5", "9000");
INSERT INTO "rankings" VALUES ("6", "8500");
INSERT INTO "rankings" VALUES ("7", "6000");
INSERT INTO "rankings" VALUES ("8", "5500");
INSERT INTO "rankings" VALUES ("9", "4000");
INSERT INTO "rankings" VALUES ("10", "3500");
INSERT INTO "rankings" VALUES ("11", "2500");
INSERT INTO "rankings" VALUES ("12", "2000");
INSERT INTO "rankings" VALUES ("13", "7000");
INSERT INTO "rankings" VALUES ("14", "6500");
INSERT INTO "rankings" VALUES ("15", "5000");