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 "city" (
"ID" INT,
"Population" INT,
PRIMARY KEY ("ID")
);

CREATE TABLE "country" (
"Code" CHAR(3),
"Name" CHAR(52),
"Population" INT,
"LifeExpectancy" FLOAT,
"GNP" FLOAT,
PRIMARY KEY ("Code")
);

CREATE TABLE "countrylanguage" (
"CountryCode" CHAR(3),
"Language" CHAR(30),
"Percentage" FLOAT,
PRIMARY KEY ("CountryCode", "Language")
);





INSERT INTO "country" VALUES ("BRA", "Brazil", "213000000", "75.7", "1839758.0");
INSERT INTO "country" VALUES ("USA", "United States", "331000000", "78.9", "21433226.0");
INSERT INTO "country" VALUES ("IND", "India", "1380000000", "69.7", "2875142.0");
INSERT INTO "country" VALUES ("CHN", "China", "1439323776", "76.9", "14342903.0");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "59300000", "64.1", "351432.0");
INSERT INTO "country" VALUES ("NOR", "Norway", "5420000", "82.5", "403336.0");
INSERT INTO "country" VALUES ("JPN", "Japan", "126000000", "84.6", "5064873.0");
INSERT INTO "country" VALUES ("RUS", "Russia", "146000000", "72.6", "1699876.0");
INSERT INTO "country" VALUES ("MEX", "Mexico", "128000000", "75.0", "1220700.0");
INSERT INTO "country" VALUES ("EGY", "Egypt", "102000000", "71.8", "303175.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "98.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "82.1");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "13.5");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "41.0");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "12.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "70.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu", "22.7");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "9.6");
INSERT INTO "countrylanguage" VALUES ("NOR", "Norwegian", "95.0");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "99.0");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian", "85.0");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish", "92.7");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "90.0");