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,
"loser_rank_points" INT,
"tourney_name" TEXT,
"winner_name" TEXT,
"winner_rank_points" INT
);

CREATE TABLE "players" (
"player_id" INT UNIQUE,
PRIMARY KEY ("player_id")
);





INSERT INTO "matches" VALUES ("Serena Williams", "2000", "Australian Open", "Naomi Osaka", "3000");
INSERT INTO "matches" VALUES ("Ashleigh Barty", "2500", "French Open", "Simona Halep", "2800");
INSERT INTO "matches" VALUES ("Naomi Osaka", "3000", "Wimbledon", "Serena Williams", "2000");
INSERT INTO "matches" VALUES ("Simona Halep", "2800", "US Open", "Ashleigh Barty", "2500");
INSERT INTO "matches" VALUES ("Victoria Azarenka", "1500", "Australian Open", "Aryna Sabalenka", "2200");
INSERT INTO "matches" VALUES ("Petra Kvitova", "1800", "Australian Open", "Karolina Pliskova", "2100");
INSERT INTO "matches" VALUES ("Angelique Kerber", "1900", "Australian Open", "Elina Svitolina", "2300");
INSERT INTO "matches" VALUES ("Garbine Muguruza", "1700", "Australian Open", "Sofia Kenin", "2400");
INSERT INTO "matches" VALUES ("Bianca Andreescu", "1600", "Australian Open", "Iga Swiatek", "2600");
INSERT INTO "matches" VALUES ("Maria Sharapova", "1000", "Australian Open", "Naomi Osaka", "3000");
INSERT INTO "matches" VALUES ("Venus Williams", "900", "Australian Open", "Serena Williams", "2000");
INSERT INTO "matches" VALUES ("Caroline Wozniacki", "800", "Australian Open", "Ashleigh Barty", "2500");
INSERT INTO "matches" VALUES ("Sloane Stephens", "700", "Australian Open", "Simona Halep", "2800");
INSERT INTO "matches" VALUES ("Madison Keys", "600", "Australian Open", "Naomi Osaka", "3000");
INSERT INTO "players" VALUES ("1");
INSERT INTO "players" VALUES ("2");
INSERT INTO "players" VALUES ("3");
INSERT INTO "players" VALUES ("4");
INSERT INTO "players" VALUES ("5");
INSERT INTO "players" VALUES ("6");
INSERT INTO "players" VALUES ("7");
INSERT INTO "players" VALUES ("8");
INSERT INTO "players" VALUES ("9");
INSERT INTO "players" VALUES ("10");
INSERT INTO "players" VALUES ("11");
INSERT INTO "players" VALUES ("12");
INSERT INTO "players" VALUES ("13");
INSERT INTO "players" VALUES ("14");
INSERT INTO "players" VALUES ("15");
INSERT INTO "players" VALUES ("16");
INSERT INTO "players" VALUES ("17");
INSERT INTO "players" VALUES ("18");
INSERT INTO "players" VALUES ("19");
INSERT INTO "players" VALUES ("20");