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,
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", "1500000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "9833520.0", "331000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "9984670.0", "38000000");
INSERT INTO "country" VALUES ("RUS", "Russia", "Europe", "17098242.0", "144000000");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "551695.0", "67000000");
INSERT INTO "country" VALUES ("GER", "Germany", "Europe", "357022.0", "83000000");
INSERT INTO "country" VALUES ("BRA", "Brazil", "South America", "8515767.0", "212000000");
INSERT INTO "country" VALUES ("CHN", "China", "Asia", "9596961.0", "1402000000");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "3287263.0", "1380000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "7692024.0", "25000000");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa", "1002450.0", "102000000");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "82.1");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "13.5");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "56.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "21.0");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian", "99.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "100.0");
INSERT INTO "countrylanguage" VALUES ("GER", "German", "95.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "98.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "70.0");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "41.0");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "12.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "72.0");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "98.0");