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,
"minutes" INT,
"tourney_date" DATE,
"tourney_name" TEXT,
"winner_name" TEXT
);

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





INSERT INTO "matches" VALUES ("Player A", "120", "2023-01-15", "Australian Open", "Player B");
INSERT INTO "matches" VALUES ("Player C", "180", "2023-01-16", "Australian Open", "Player D");
INSERT INTO "matches" VALUES ("Player E", "90", "2023-02-01", "Dubai Open", "Player F");
INSERT INTO "matches" VALUES ("Player G", "240", "2023-02-02", "Dubai Open", "Player H");
INSERT INTO "matches" VALUES ("Player I", "150", "2023-03-10", "Indian Wells", "Player J");
INSERT INTO "matches" VALUES ("Player K", "240", "2023-03-11", "Indian Wells", "Player L");
INSERT INTO "matches" VALUES ("Player M", "240", "2023-04-05", "Miami Open", "Player N");
INSERT INTO "matches" VALUES ("Player O", "200", "2023-04-06", "Miami Open", "Player P");
INSERT INTO "matches" VALUES ("Player Q", "100", "2023-05-20", "French Open", "Player R");
INSERT INTO "matches" VALUES ("Player S", "240", "2023-05-21", "French Open", "Player T");
INSERT INTO "matches" VALUES ("Player U", "240", "2023-06-25", "Wimbledon", "Player V");
INSERT INTO "matches" VALUES ("Player W", "240", "2023-06-26", "Wimbledon", "Player X");
INSERT INTO "matches" VALUES ("Player Y", "240", "2023-07-10", "US Open", "Player Z");
INSERT INTO "matches" VALUES ("Player AA", "240", "2023-07-11", "US Open", "Player BB");
INSERT INTO "matches" VALUES ("Player CC", "240", "2023-08-01", "Cincinnati Open", "Player DD");
INSERT INTO "matches" VALUES ("Player EE", "240", "2023-08-02", "Cincinnati Open", "Player FF");
INSERT INTO "matches" VALUES ("Player GG", "240", "2023-09-15", "China Open", "Player HH");
INSERT INTO "matches" VALUES ("Player II", "240", "2023-09-16", "China Open", "Player JJ");
INSERT INTO "matches" VALUES ("Player KK", "240", "2023-10-01", "WTA Finals", "Player LL");
INSERT INTO "matches" VALUES ("Player MM", "240", "2023-10-02", "WTA Finals", "Player NN");
INSERT INTO "players" VALUES ("1", "USA");
INSERT INTO "players" VALUES ("2", "CAN");
INSERT INTO "players" VALUES ("3", "GBR");
INSERT INTO "players" VALUES ("4", "AUS");
INSERT INTO "players" VALUES ("5", "FRA");
INSERT INTO "players" VALUES ("6", "GER");
INSERT INTO "players" VALUES ("7", "ESP");
INSERT INTO "players" VALUES ("8", "ITA");
INSERT INTO "players" VALUES ("9", "RUS");
INSERT INTO "players" VALUES ("10", "CHN");
INSERT INTO "players" VALUES ("11", "JPN");
INSERT INTO "players" VALUES ("12", "SUI");
INSERT INTO "players" VALUES ("13", "POL");
INSERT INTO "players" VALUES ("14", "CZE");
INSERT INTO "players" VALUES ("15", "SRB");
INSERT INTO "players" VALUES ("16", "BEL");
INSERT INTO "players" VALUES ("17", "NED");
INSERT INTO "players" VALUES ("18", "SWE");
INSERT INTO "players" VALUES ("19", "DEN");
INSERT INTO "players" VALUES ("20", "NOR");