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),
"Continent" TEXT,
"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 "city" VALUES ("1", "5000000");
INSERT INTO "city" VALUES ("2", "12000000");
INSERT INTO "city" VALUES ("3", "300000");
INSERT INTO "city" VALUES ("4", "7500000");
INSERT INTO "city" VALUES ("5", "15000000");
INSERT INTO "city" VALUES ("6", "200000");
INSERT INTO "city" VALUES ("7", "1000000");
INSERT INTO "city" VALUES ("8", "4500000");
INSERT INTO "city" VALUES ("9", "800000");
INSERT INTO "city" VALUES ("10", "600000");
INSERT INTO "country" VALUES ("CHN", "Asia", "1400000000", "76.7", "14000000.0");
INSERT INTO "country" VALUES ("IND", "Asia", "1380000000", "69.4", "2800000.0");
INSERT INTO "country" VALUES ("JPN", "Asia", "126000000", "84.5", "5000000.0");
INSERT INTO "country" VALUES ("KOR", "Asia", "52000000", "83.0", "1800000.0");
INSERT INTO "country" VALUES ("VNM", "Asia", "97000000", "73.7", "300000.0");
INSERT INTO "country" VALUES ("FRA", "Europe", "67000000", "82.5", "2700000.0");
INSERT INTO "country" VALUES ("USA", "North America", "330000000", "78.9", "21000000.0");
INSERT INTO "country" VALUES ("RUS", "Europe", "144000000", "72.6", "1600000.0");
INSERT INTO "country" VALUES ("EGY", "Africa", "100000000", "71.8", "300000.0");
INSERT INTO "country" VALUES ("IDN", "Asia", "270000000", "71.7", "1100000.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "70.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Cantonese", "5.0");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "40.0");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "12.0");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "99.0");
INSERT INTO "countrylanguage" VALUES ("KOR", "Korean", "97.0");
INSERT INTO "countrylanguage" VALUES ("VNM", "Vietnamese", "86.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "88.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "80.0");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian", "85.0");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "90.0");
INSERT INTO "countrylanguage" VALUES ("IDN", "Indonesian", "85.0");