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 ("2013-01-15", "2013");
INSERT INTO "matches" VALUES ("2013-06-20", "2013");
INSERT INTO "matches" VALUES ("2013-12-05", "2013");
INSERT INTO "matches" VALUES ("2014-03-10", "2014");
INSERT INTO "matches" VALUES ("2015-07-22", "2015");
INSERT INTO "matches" VALUES ("2016-02-18", "2016");
INSERT INTO "matches" VALUES ("2016-08-30", "2016");
INSERT INTO "matches" VALUES ("2016-11-11", "2016");
INSERT INTO "matches" VALUES ("2017-04-25", "2017");
INSERT INTO "players" VALUES ("1", "1990-05-12");
INSERT INTO "players" VALUES ("2", "1988-11-23");
INSERT INTO "players" VALUES ("3", "1995-07-30");
INSERT INTO "players" VALUES ("4", "1992-01-15");
INSERT INTO "rankings" VALUES ("2013-01-01");
INSERT INTO "rankings" VALUES ("2013-06-01");
INSERT INTO "rankings" VALUES ("2014-01-01");
INSERT INTO "rankings" VALUES ("2016-01-01");
INSERT INTO "rankings" VALUES ("2016-07-01");
INSERT INTO "rankings" VALUES ("2017-01-01");