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,
"SurfaceArea" FLOAT,
"Population" INT,
"LifeExpectancy" 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", "800000");
INSERT INTO "city" VALUES ("4", "3000000");
INSERT INTO "city" VALUES ("5", "15000000");
INSERT INTO "city" VALUES ("6", "2000000");
INSERT INTO "country" VALUES ("CHN", "China", "Asia", "9596961.0", "1400000000", "76.7");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "3287263.0", "1380004385", "69.4");
INSERT INTO "country" VALUES ("RUS", "Russia", "Europe", "17098242.0", "146000000", "72.6");
INSERT INTO "country" VALUES ("JPN", "Japan", "Asia", "377975.0", "126300000", "84.5");
INSERT INTO "country" VALUES ("IDN", "Indonesia", "Asia", "1904569.0", "273523615", "71.7");
INSERT INTO "country" VALUES ("KAZ", "Kazakhstan", "Asia", "2724900.0", "18776707", "72.0");
INSERT INTO "country" VALUES ("SAU", "Saudi Arabia", "Asia", "2149690.0", "34813871", "75.0");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa", "1002450.0", "102334404", "71.8");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "70.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Cantonese", "5.0");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "41.0");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "12.0");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian", "85.0");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "99.0");
INSERT INTO "countrylanguage" VALUES ("IDN", "Indonesian", "90.0");
INSERT INTO "countrylanguage" VALUES ("KAZ", "Kazakh", "64.0");
INSERT INTO "countrylanguage" VALUES ("KAZ", "Russian", "20.0");
INSERT INTO "countrylanguage" VALUES ("SAU", "Arabic", "90.0");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "95.0");