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

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

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





INSERT INTO "matches" VALUES ("2019-01-15", "2019");
INSERT INTO "matches" VALUES ("2019-06-20", "2019");
INSERT INTO "matches" VALUES ("2020-03-10", "2020");
INSERT INTO "matches" VALUES ("2020-11-05", "2020");
INSERT INTO "matches" VALUES ("2020-12-15", "2020");
INSERT INTO "matches" VALUES ("2021-07-22", "2021");
INSERT INTO "matches" VALUES ("2021-08-30", "2021");
INSERT INTO "matches" VALUES ("2021-09-10", "2021");
INSERT INTO "matches" VALUES ("2021-10-01", "2021");
INSERT INTO "matches" VALUES ("2022-02-14", "2022");
INSERT INTO "matches" VALUES ("2022-05-18", "2022");
INSERT INTO "matches" VALUES ("2022-09-25", "2022");
INSERT INTO "matches" VALUES ("2023-01-05", "2023");
INSERT INTO "matches" VALUES ("2023-04-12", "2023");
INSERT INTO "matches" VALUES ("2023-07-19", "2023");
INSERT INTO "players" VALUES ("1", "1995-04-10");
INSERT INTO "players" VALUES ("2", "1990-11-23");
INSERT INTO "players" VALUES ("3", "1988-07-15");
INSERT INTO "players" VALUES ("4", "2000-01-30");
INSERT INTO "players" VALUES ("5", "1997-09-05");
INSERT INTO "rankings" VALUES ("2019-01-01");
INSERT INTO "rankings" VALUES ("2019-06-01");
INSERT INTO "rankings" VALUES ("2020-01-01");
INSERT INTO "rankings" VALUES ("2020-06-01");
INSERT INTO "rankings" VALUES ("2021-01-01");
INSERT INTO "rankings" VALUES ("2021-06-01");
INSERT INTO "rankings" VALUES ("2022-01-01");
INSERT INTO "rankings" VALUES ("2022-06-01");
INSERT INTO "rankings" VALUES ("2023-01-01");
INSERT INTO "rankings" VALUES ("2023-06-01");