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

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

CREATE TABLE "rankings" (
"ranking_date" DATE
);





INSERT INTO "matches" VALUES ("1", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("2", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("3", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("4", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("5", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("6", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("7", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("8", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("9", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("10", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("11", "2023-01-10", "Australian Open");
INSERT INTO "matches" VALUES ("12", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("13", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("14", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("15", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("16", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("17", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("18", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("19", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("20", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("21", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("22", "2023-02-15", "French Open");
INSERT INTO "matches" VALUES ("23", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("24", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("25", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("26", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("27", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("28", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("29", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("30", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("31", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("32", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("33", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("34", "2023-03-20", "Wimbledon");
INSERT INTO "matches" VALUES ("35", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("36", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("37", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("38", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("39", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("40", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("41", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("42", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("43", "2023-04-25", "US Open");
INSERT INTO "matches" VALUES ("44", "2023-04-25", "US Open");
INSERT INTO "players" VALUES ("1", "USA");
INSERT INTO "players" VALUES ("2", "ESP");
INSERT INTO "players" VALUES ("3", "FRA");
INSERT INTO "players" VALUES ("4", "GER");
INSERT INTO "players" VALUES ("5", "AUS");
INSERT INTO "players" VALUES ("6", "RUS");
INSERT INTO "players" VALUES ("7", "CZE");
INSERT INTO "players" VALUES ("8", "JPN");
INSERT INTO "players" VALUES ("9", "ITA");
INSERT INTO "players" VALUES ("10", "SRB");
INSERT INTO "rankings" VALUES ("2023-01-01");
INSERT INTO "rankings" VALUES ("2023-02-01");
INSERT INTO "rankings" VALUES ("2023-03-01");
INSERT INTO "rankings" VALUES ("2023-04-01");
INSERT INTO "rankings" VALUES ("2023-05-01");