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" (
"winner_rank" INT
);

CREATE TABLE "rankings" (
"ranking_date" DATE,
"player_id" INT,
"ranking_points" INT,
"tours" INT
);





INSERT INTO "matches" VALUES ("1");
INSERT INTO "matches" VALUES ("2");
INSERT INTO "matches" VALUES ("3");
INSERT INTO "matches" VALUES ("4");
INSERT INTO "matches" VALUES ("5");
INSERT INTO "matches" VALUES ("6");
INSERT INTO "matches" VALUES ("7");
INSERT INTO "matches" VALUES ("8");
INSERT INTO "matches" VALUES ("9");
INSERT INTO "matches" VALUES ("10");
INSERT INTO "rankings" VALUES ("2023-01-01", "101", "8000", "15");
INSERT INTO "rankings" VALUES ("2023-01-01", "102", "7500", "12");
INSERT INTO "rankings" VALUES ("2023-01-01", "103", "6000", "10");
INSERT INTO "rankings" VALUES ("2023-01-08", "101", "8100", "16");
INSERT INTO "rankings" VALUES ("2023-01-08", "102", "7400", "12");
INSERT INTO "rankings" VALUES ("2023-01-08", "104", "5500", "9");
INSERT INTO "rankings" VALUES ("2023-01-15", "101", "8200", "17");
INSERT INTO "rankings" VALUES ("2023-01-15", "103", "6100", "11");
INSERT INTO "rankings" VALUES ("2023-01-15", "104", "5600", "10");
INSERT INTO "rankings" VALUES ("2023-01-22", "102", "7600", "13");
INSERT INTO "rankings" VALUES ("2023-01-22", "105", "4000", "8");