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 ("2020-01-15", "2020");
INSERT INTO "matches" VALUES ("2020-02-20", "2020");
INSERT INTO "matches" VALUES ("2020-03-10", "2020");
INSERT INTO "matches" VALUES ("2021-01-05", "2021");
INSERT INTO "matches" VALUES ("2021-02-15", "2021");
INSERT INTO "matches" VALUES ("2021-03-25", "2021");
INSERT INTO "matches" VALUES ("2021-04-30", "2021");
INSERT INTO "matches" VALUES ("2019-05-10", "2019");
INSERT INTO "matches" VALUES ("2019-06-20", "2019");
INSERT INTO "matches" VALUES ("2018-07-15", "2018");
INSERT INTO "matches" VALUES ("2018-08-25", "2018");
INSERT INTO "matches" VALUES ("2018-09-05", "2018");
INSERT INTO "matches" VALUES ("2018-10-10", "2018");
INSERT INTO "matches" VALUES ("2018-11-20", "2018");
INSERT INTO "players" VALUES ("1", "1990-05-15");
INSERT INTO "players" VALUES ("2", "1988-11-30");
INSERT INTO "players" VALUES ("3", "1995-07-22");
INSERT INTO "players" VALUES ("4", "1992-03-10");
INSERT INTO "players" VALUES ("5", "1985-12-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 ("2019-01-01");
INSERT INTO "rankings" VALUES ("2018-01-01");