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),
"Population" INT,
"LifeExpectancy" FLOAT,
"GovernmentForm" CHAR(45),
PRIMARY KEY ("Code")
);

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





INSERT INTO "city" VALUES ("1", "5000000");
INSERT INTO "city" VALUES ("2", "12000000");
INSERT INTO "city" VALUES ("3", "800000");
INSERT INTO "city" VALUES ("4", "3000000");
INSERT INTO "city" VALUES ("5", "15000000");
INSERT INTO "city" VALUES ("6", "2000000");
INSERT INTO "city" VALUES ("7", "1000000");
INSERT INTO "city" VALUES ("8", "4000000");
INSERT INTO "city" VALUES ("9", "600000");
INSERT INTO "city" VALUES ("10", "700000");
INSERT INTO "country" VALUES ("USA", "331000000", "78.9", "Federal Republic");
INSERT INTO "country" VALUES ("CAN", "38000000", "82.3", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("MEX", "128000000", "75.0", "Federal Republic");
INSERT INTO "country" VALUES ("BRA", "213000000", "73.2", "Federal Republic");
INSERT INTO "country" VALUES ("RUS", "146000000", "72.6", "Federal Republic");
INSERT INTO "country" VALUES ("IND", "1380000000", "69.7", "Federal Republic");
INSERT INTO "country" VALUES ("CHN", "1439000000", "76.9", "Communist State");
INSERT INTO "country" VALUES ("JPN", "126000000", "84.5", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("DEU", "83000000", "81.0", "Federal Republic");
INSERT INTO "country" VALUES ("FRA", "67000000", "82.4", "Republic");
INSERT INTO "country" VALUES ("ITA", "60000000", "83.4", "Republic");
INSERT INTO "country" VALUES ("ZAF", "59000000", "64.1", "Republic");
INSERT INTO "country" VALUES ("EGY", "102000000", "71.7", "Republic");
INSERT INTO "country" VALUES ("SAU", "35000000", "75.0", "Monarchy");
INSERT INTO "country" VALUES ("AUS", "25000000", "83.0", "Constitutional Monarchy");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "82.1");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "13.5");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "56.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "21.0");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish", "92.7");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "98.0");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian", "95.0");
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 ("JPN", "Japanese", "99.0");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "95.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "88.0");
INSERT INTO "countrylanguage" VALUES ("ITA", "Italian", "93.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu", "22.7");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "9.6");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "90.0");
INSERT INTO "countrylanguage" VALUES ("SAU", "Arabic", "100.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "72.7");
INSERT INTO "countrylanguage" VALUES ("AUS", "Mandarin", "2.5");