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,
"Name" CHAR(35),
"Population" INT,
PRIMARY KEY ("ID")
);

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
"Population" INT,
PRIMARY KEY ("Code")
);

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





INSERT INTO "city" VALUES ("1", "London", "8982000");
INSERT INTO "city" VALUES ("2", "Paris", "2141000");
INSERT INTO "city" VALUES ("3", "Ottawa", "994837");
INSERT INTO "city" VALUES ("4", "Washington D.C.", "705749");
INSERT INTO "city" VALUES ("5", "Berlin", "3769000");
INSERT INTO "city" VALUES ("6", "Rome", "2873000");
INSERT INTO "city" VALUES ("7", "Madrid", "3223000");
INSERT INTO "city" VALUES ("8", "Beijing", "21540000");
INSERT INTO "city" VALUES ("9", "Tokyo", "13960000");
INSERT INTO "city" VALUES ("10", "Canberra", "462000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "67886000");
INSERT INTO "country" VALUES ("FRA", "France", "65273000");
INSERT INTO "country" VALUES ("CAN", "Canada", "37742000");
INSERT INTO "country" VALUES ("USA", "United States", "328239000");
INSERT INTO "country" VALUES ("DEU", "Germany", "83784000");
INSERT INTO "country" VALUES ("ITA", "Italy", "59554000");
INSERT INTO "country" VALUES ("ESP", "Spain", "46755000");
INSERT INTO "country" VALUES ("CHN", "China", "1439324000");
INSERT INTO "country" VALUES ("JPN", "Japan", "126476000");
INSERT INTO "country" VALUES ("AUS", "Australia", "25499000");
INSERT INTO "country" VALUES ("BEL", "Belgium", "11589000");
INSERT INTO "country" VALUES ("CHE", "Switzerland", "8637000");
INSERT INTO "country" VALUES ("IND", "India", "1380004000");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "59308000");
INSERT INTO "country" VALUES ("CMR", "Cameroon", "26546000");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T", "98.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T", "95.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T", "58.7");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T", "22.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T", "82.1");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T", "91.5");
INSERT INTO "countrylanguage" VALUES ("ITA", "Italian", "T", "97.0");
INSERT INTO "countrylanguage" VALUES ("ESP", "Spanish", "T", "99.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "T", "70.0");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "T", "99.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T", "76.8");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "T", "59.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "French", "T", "40.0");
INSERT INTO "countrylanguage" VALUES ("CHE", "German", "T", "63.5");
INSERT INTO "countrylanguage" VALUES ("CHE", "French", "T", "22.9");
INSERT INTO "countrylanguage" VALUES ("CHE", "Italian", "T", "8.2");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "T", "43.6");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "F", "12.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "T", "9.6");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans", "T", "13.5");
INSERT INTO "countrylanguage" VALUES ("CMR", "English", "T", "20.0");
INSERT INTO "countrylanguage" VALUES ("CMR", "French", "T", "80.0");