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 "Player" (
"id" INT,
"player_api_id" INT UNIQUE,
"player_name" TEXT,
PRIMARY KEY ("id")
);

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



INSERT INTO "Player" VALUES ("1", "1001", "Lionel Messi");
INSERT INTO "Player" VALUES ("2", "1002", "Cristiano Ronaldo");
INSERT INTO "Player" VALUES ("3", "1003", "Neymar Jr.");
INSERT INTO "Player" VALUES ("4", "1004", "Kevin De Bruyne");
INSERT INTO "Player" VALUES ("5", "1005", "Luka Modric");
INSERT INTO "Player" VALUES ("6", "1006", "Gareth Bale");
INSERT INTO "Player" VALUES ("7", "1007", "Mohamed Salah");
INSERT INTO "Player" VALUES ("8", "1008", "Antoine Griezmann");
INSERT INTO "Player" VALUES ("9", "1009", "Eden Hazard");
INSERT INTO "Player" VALUES ("10", "1010", "David Alaba");
INSERT INTO "Player" VALUES ("11", "1011", "Marcelo");
INSERT INTO "Player" VALUES ("12", "1012", "Jordi Alba");
INSERT INTO "Player" VALUES ("13", "1013", "Andrew Robertson");
INSERT INTO "Player" VALUES ("14", "1014", "Trent Alexander-Arnold");
INSERT INTO "Player" VALUES ("15", "1015", "Kylian Mbappe");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "94", "left", "88", "95");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "93", "right", "84", "93");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "92", "right", "80", "90");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "91", "right", "92", "86");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "90", "right", "86", "78");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "89", "left", "87", "85");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "89", "left", "79", "91");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "88", "left", "78", "89");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "88", "right", "83", "82");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "87", "left", "90", "70");
INSERT INTO "Player_Attributes" VALUES ("11", "1011", "86", "left", "90", "65");
INSERT INTO "Player_Attributes" VALUES ("12", "1012", "85", "left", "88", "60");
INSERT INTO "Player_Attributes" VALUES ("13", "1013", "87", "left", "91", "68");
INSERT INTO "Player_Attributes" VALUES ("14", "1014", "87", "right", "92", "70");
INSERT INTO "Player_Attributes" VALUES ("15", "1015", "91", "right", "75", "92");