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

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



INSERT INTO "Player" VALUES ("1", "1001", "Player A", "180");
INSERT INTO "Player" VALUES ("2", "1002", "Player B", "175");
INSERT INTO "Player" VALUES ("3", "1003", "Player C", "185");
INSERT INTO "Player" VALUES ("4", "1004", "Player D", "190");
INSERT INTO "Player" VALUES ("5", "1005", "Player E", "170");
INSERT INTO "Player" VALUES ("6", "1006", "Player F", "182");
INSERT INTO "Player" VALUES ("7", "1007", "Player G", "178");
INSERT INTO "Player" VALUES ("8", "1008", "Player H", "188");
INSERT INTO "Player" VALUES ("9", "1009", "Player I", "172");
INSERT INTO "Player" VALUES ("10", "1010", "Player J", "195");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "85", "90", "85");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "78", "75", "82");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "92", "88", "91");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "80", "81", "79");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "70", "65", "70");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "89", "85", "86");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "75", "70", "75");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "95", "92", "93");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "68", "60", "65");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "83", "80", "84");
INSERT INTO "Player_Attributes" VALUES ("11", "1001", "86", "91", "86");
INSERT INTO "Player_Attributes" VALUES ("12", "1002", "79", "76", "83");
INSERT INTO "Player_Attributes" VALUES ("13", "1003", "93", "89", "92");
INSERT INTO "Player_Attributes" VALUES ("14", "1004", "81", "82", "80");
INSERT INTO "Player_Attributes" VALUES ("15", "1005", "71", "66", "71");
INSERT INTO "Player_Attributes" VALUES ("16", "1006", "90", "86", "87");
INSERT INTO "Player_Attributes" VALUES ("17", "1007", "76", "71", "76");
INSERT INTO "Player_Attributes" VALUES ("18", "1008", "96", "93", "94");
INSERT INTO "Player_Attributes" VALUES ("19", "1009", "69", "61", "66");
INSERT INTO "Player_Attributes" VALUES ("20", "1010", "84", "81", "85");