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 "Match" (
"id" INT,
"home_team_api_id" INT,
PRIMARY KEY ("id")
);

CREATE TABLE "Player" (
"id" INT,
"player_api_id" INT UNIQUE,
"player_name" TEXT,
"height" INT,
"weight" INT,
PRIMARY KEY ("id")
);

CREATE TABLE "Player_Attributes" (
"id" INT,
"player_api_id" INT,
"date" TEXT,
"overall_rating" INT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);



INSERT INTO "Match" VALUES ("1", "8634");
INSERT INTO "Match" VALUES ("2", "8634");
INSERT INTO "Match" VALUES ("3", "9987");
INSERT INTO "Match" VALUES ("4", "8634");
INSERT INTO "Match" VALUES ("5", "9987");
INSERT INTO "Match" VALUES ("6", "8634");
INSERT INTO "Match" VALUES ("7", "9987");
INSERT INTO "Match" VALUES ("8", "8634");
INSERT INTO "Match" VALUES ("9", "9987");
INSERT INTO "Match" VALUES ("10", "8634");
INSERT INTO "Player" VALUES ("1", "100001", "Lionel Messi", "170", "72");
INSERT INTO "Player" VALUES ("2", "100002", "Cristiano Ronaldo", "187", "83");
INSERT INTO "Player" VALUES ("3", "100003", "Neymar Jr.", "175", "68");
INSERT INTO "Player" VALUES ("4", "100004", "Sergio Ramos", "184", "82");
INSERT INTO "Player" VALUES ("5", "100005", "Luka Modric", "172", "66");
INSERT INTO "Player" VALUES ("6", "100006", "Eden Hazard", "173", "74");
INSERT INTO "Player" VALUES ("7", "100007", "Kevin De Bruyne", "181", "70");
INSERT INTO "Player" VALUES ("8", "100008", "Robert Lewandowski", "185", "79");
INSERT INTO "Player" VALUES ("9", "100009", "Kylian Mbappe", "178", "73");
INSERT INTO "Player" VALUES ("10", "100010", "Virgil van Dijk", "193", "92");
INSERT INTO "Player" VALUES ("11", "100011", "Antoine Griezmann", "176", "69");
INSERT INTO "Player" VALUES ("12", "100012", "Mohamed Salah", "175", "71");
INSERT INTO "Player" VALUES ("13", "100013", "Harry Kane", "188", "89");
INSERT INTO "Player" VALUES ("14", "100014", "Manuel Neuer", "193", "92");
INSERT INTO "Player" VALUES ("15", "100015", "Jan Oblak", "188", "87");
INSERT INTO "Player_Attributes" VALUES ("1", "100001", "2010-09-20", "92");
INSERT INTO "Player_Attributes" VALUES ("2", "100001", "2011-03-15", "93");
INSERT INTO "Player_Attributes" VALUES ("3", "100001", "2012-01-01", "94");
INSERT INTO "Player_Attributes" VALUES ("4", "100001", "2015-12-31", "95");
INSERT INTO "Player_Attributes" VALUES ("5", "100002", "2010-10-01", "90");
INSERT INTO "Player_Attributes" VALUES ("6", "100002", "2013-05-20", "92");
INSERT INTO "Player_Attributes" VALUES ("7", "100002", "2015-07-01", "93");
INSERT INTO "Player_Attributes" VALUES ("8", "100003", "2013-02-10", "85");
INSERT INTO "Player_Attributes" VALUES ("9", "100003", "2014-11-05", "88");
INSERT INTO "Player_Attributes" VALUES ("10", "100003", "2016-01-01", "89");
INSERT INTO "Player_Attributes" VALUES ("11", "100004", "2010-01-01", "87");
INSERT INTO "Player_Attributes" VALUES ("12", "100004", "2012-06-30", "89");
INSERT INTO "Player_Attributes" VALUES ("13", "100004", "2015-09-10", "90");
INSERT INTO "Player_Attributes" VALUES ("14", "100005", "2011-04-01", "86");
INSERT INTO "Player_Attributes" VALUES ("15", "100005", "2014-08-15", "88");
INSERT INTO "Player_Attributes" VALUES ("16", "100006", "2012-07-01", "85");
INSERT INTO "Player_Attributes" VALUES ("17", "100006", "2015-02-28", "89");
INSERT INTO "Player_Attributes" VALUES ("18", "100007", "2013-09-01", "84");
INSERT INTO "Player_Attributes" VALUES ("19", "100007", "2015-11-11", "88");
INSERT INTO "Player_Attributes" VALUES ("20", "100008", "2010-05-01", "83");
INSERT INTO "Player_Attributes" VALUES ("21", "100008", "2014-03-01", "87");
INSERT INTO "Player_Attributes" VALUES ("22", "100009", "2016-01-01", "80");
INSERT INTO "Player_Attributes" VALUES ("23", "100010", "2017-01-01", "85");
INSERT INTO "Player_Attributes" VALUES ("24", "100011", "2009-12-31", "80");
INSERT INTO "Player_Attributes" VALUES ("25", "100012", "2018-01-01", "90");
INSERT INTO "Player_Attributes" VALUES ("26", "100013", "2015-01-01", "86");
INSERT INTO "Player_Attributes" VALUES ("27", "100014", "2010-01-01", "88");
INSERT INTO "Player_Attributes" VALUES ("28", "100014", "2015-12-31", "90");
INSERT INTO "Player_Attributes" VALUES ("29", "100015", "2014-06-01", "85");