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", "1380004385");
INSERT INTO "city" VALUES ("3", "126000000");
INSERT INTO "city" VALUES ("4", "22000000");
INSERT INTO "city" VALUES ("5", "5000000");
INSERT INTO "city" VALUES ("6", "1500000");
INSERT INTO "city" VALUES ("7", "300000");
INSERT INTO "city" VALUES ("8", "100000");
INSERT INTO "city" VALUES ("9", "35000000");
INSERT INTO "city" VALUES ("10", "9000000");
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 ("SGP", "Singapore", "Asia", "Southeast Asia");
INSERT INTO "country" VALUES ("MYS", "Malaysia", "Asia", "Southeast Asia");
INSERT INTO "country" VALUES ("BRN", "Brunei", "Asia", "Southeast Asia");
INSERT INTO "country" VALUES ("BTN", "Bhutan", "Asia", "Southern Asia");
INSERT INTO "country" VALUES ("RUS", "Russia", "Asia", "Northern Asia");
INSERT INTO "country" VALUES ("NPL", "Nepal", "Asia", "Southern Asia");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "70.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Cantonese", "5.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Wu", "8.0");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "40.0");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "12.0");
INSERT INTO "countrylanguage" VALUES ("IND", "Bengali", "8.0");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "99.0");
INSERT INTO "countrylanguage" VALUES ("KOR", "Korean", "97.0");
INSERT INTO "countrylanguage" VALUES ("SGP", "English", "36.0");
INSERT INTO "countrylanguage" VALUES ("SGP", "Mandarin", "35.0");
INSERT INTO "countrylanguage" VALUES ("SGP", "Malay", "15.0");
INSERT INTO "countrylanguage" VALUES ("MYS", "Malay", "60.0");
INSERT INTO "countrylanguage" VALUES ("MYS", "English", "20.0");
INSERT INTO "countrylanguage" VALUES ("BRN", "Malay", "70.0");
INSERT INTO "countrylanguage" VALUES ("BRN", "English", "15.0");
INSERT INTO "countrylanguage" VALUES ("BTN", "Dzongkha", "75.0");
INSERT INTO "countrylanguage" VALUES ("BTN", "Nepali", "20.0");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian", "80.0");
INSERT INTO "countrylanguage" VALUES ("RUS", "Tatar", "5.0");
INSERT INTO "countrylanguage" VALUES ("NPL", "Nepali", "45.0");
INSERT INTO "countrylanguage" VALUES ("NPL", "Maithili", "12.0");
INSERT INTO "countrylanguage" VALUES ("NPL", "Bhojpuri", "8.0");