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) UNIQUE,
"Name" CHAR(52),
"Continent" TEXT,
"Region" CHAR(26),
PRIMARY KEY ("Code")
);

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





INSERT INTO "city" VALUES ("1", "1400000000");
INSERT INTO "city" VALUES ("2", "1300000000");
INSERT INTO "city" VALUES ("3", "50000000");
INSERT INTO "city" VALUES ("4", "30000000");
INSERT INTO "city" VALUES ("5", "20000000");
INSERT INTO "city" VALUES ("6", "10000000");
INSERT INTO "city" VALUES ("7", "8000000");
INSERT INTO "city" VALUES ("8", "7000000");
INSERT INTO "city" VALUES ("9", "6000000");
INSERT INTO "city" VALUES ("10", "5000000");
INSERT INTO "country" VALUES ("CHN", "China", "Asia", "Eastern Asia");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "Southern Asia");
INSERT INTO "country" VALUES ("JPN", "Japan", "Asia", "Eastern Asia");
INSERT INTO "country" VALUES ("KOR", "South Korea", "Asia", "Eastern Asia");
INSERT INTO "country" VALUES ("IDN", "Indonesia", "Asia", "Southeast Asia");
INSERT INTO "country" VALUES ("PAK", "Pakistan", "Asia", "Southern Asia");
INSERT INTO "country" VALUES ("BGD", "Bangladesh", "Asia", "Southern Asia");
INSERT INTO "country" VALUES ("RUS", "Russia", "Europe", "Eastern Europe");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "Northern America");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa", "Northern Africa");
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 ("IDN", "Indonesian", "85.0");
INSERT INTO "countrylanguage" VALUES ("PAK", "Urdu", "8.0");
INSERT INTO "countrylanguage" VALUES ("PAK", "Punjabi", "44.0");
INSERT INTO "countrylanguage" VALUES ("BGD", "Bengali", "98.0");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian", "80.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "95.0");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "90.0");