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 ("2018-01-15", "2018");
INSERT INTO "matches" VALUES ("2018-03-22", "2018");
INSERT INTO "matches" VALUES ("2018-07-10", "2018");
INSERT INTO "matches" VALUES ("2019-02-05", "2019");
INSERT INTO "matches" VALUES ("2019-05-18", "2019");
INSERT INTO "matches" VALUES ("2019-05-19", "2019");
INSERT INTO "matches" VALUES ("2019-05-20", "2019");
INSERT INTO "matches" VALUES ("2020-08-01", "2020");
INSERT INTO "matches" VALUES ("2020-08-02", "2020");
INSERT INTO "matches" VALUES ("2020-08-03", "2020");
INSERT INTO "matches" VALUES ("2020-08-04", "2020");
INSERT INTO "matches" VALUES ("2020-08-05", "2020");
INSERT INTO "matches" VALUES ("2021-11-11", "2021");
INSERT INTO "matches" VALUES ("2021-11-12", "2021");
INSERT INTO "matches" VALUES ("2021-11-13", "2021");
INSERT INTO "matches" VALUES ("2021-11-14", "2021");
INSERT INTO "matches" VALUES ("2021-11-15", "2021");
INSERT INTO "matches" VALUES ("2021-11-16", "2021");
INSERT INTO "matches" VALUES ("2023-04-10", "2023");
INSERT INTO "matches" VALUES ("2023-04-11", "2023");
INSERT INTO "matches" VALUES ("2023-04-12", "2023");
INSERT INTO "matches" VALUES ("2023-04-13", "2023");
INSERT INTO "matches" VALUES ("2023-04-14", "2023");
INSERT INTO "matches" VALUES ("2023-04-15", "2023");
INSERT INTO "matches" VALUES ("2023-04-16", "2023");
INSERT INTO "matches" VALUES ("2023-04-17", "2023");
INSERT INTO "matches" VALUES ("2023-04-18", "2023");
INSERT INTO "matches" VALUES ("2023-04-19", "2023");
INSERT INTO "players" VALUES ("1", "1990-05-20");
INSERT INTO "players" VALUES ("2", "1988-11-15");
INSERT INTO "players" VALUES ("3", "1995-07-30");
INSERT INTO "players" VALUES ("4", "2000-01-01");
INSERT INTO "players" VALUES ("5", "1992-12-12");
INSERT INTO "rankings" VALUES ("2018-01-01");
INSERT INTO "rankings" VALUES ("2019-01-01");
INSERT INTO "rankings" VALUES ("2020-01-01");
INSERT INTO "rankings" VALUES ("2021-01-01");
INSERT INTO "rankings" VALUES ("2022-01-01");
INSERT INTO "rankings" VALUES ("2023-01-01");