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", "90", "2023-01-15", "Australian Open", "Player D");
INSERT INTO "matches" VALUES ("Player E", "180", "2023-02-01", "French Open", "Player F");
INSERT INTO "matches" VALUES ("Player G", "150", "2023-02-01", "French Open", "Player H");
INSERT INTO "matches" VALUES ("Player I", "200", "2023-03-10", "Wimbledon", "Player J");
INSERT INTO "matches" VALUES ("Player K", "110", "2023-03-10", "Wimbledon", "Player L");
INSERT INTO "matches" VALUES ("Player M", "200", "2023-04-05", "US Open", "Player N");
INSERT INTO "matches" VALUES ("Player O", "170", "2023-04-05", "US Open", "Player P");
INSERT INTO "matches" VALUES ("Player Q", "80", "2023-05-20", "Miami Open", "Player R");
INSERT INTO "matches" VALUES ("Player S", "199", "2023-05-20", "Miami Open", "Player T");
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", "JPN");
INSERT INTO "players" VALUES ("10", "CHN");
INSERT INTO "players" VALUES ("11", "USA");
INSERT INTO "players" VALUES ("12", "CAN");
INSERT INTO "players" VALUES ("13", "GBR");
INSERT INTO "players" VALUES ("14", "AUS");
INSERT INTO "players" VALUES ("15", "FRA");
INSERT INTO "players" VALUES ("16", "GER");
INSERT INTO "players" VALUES ("17", "ESP");
INSERT INTO "players" VALUES ("18", "ITA");
INSERT INTO "players" VALUES ("19", "JPN");
INSERT INTO "players" VALUES ("20", "CHN");