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),
"Name" CHAR(52),
"SurfaceArea" FLOAT,
"IndepYear" INT,
"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", "300000");
INSERT INTO "city" VALUES ("4", "750000");
INSERT INTO "city" VALUES ("5", "1500000");
INSERT INTO "country" VALUES ("AAA", "CountryA", "450000.5", "1950", "10000000", "72.5");
INSERT INTO "country" VALUES ("BBB", "CountryB", "1200000.0", "1800", "5000000", "68.0");
INSERT INTO "country" VALUES ("CCC", "CountryC", "300000.0", "2000", "300000", "75.0");
INSERT INTO "country" VALUES ("DDD", "CountryD", "800000.0", "1900", "300000", "70.0");
INSERT INTO "country" VALUES ("EEE", "CountryE", "600000.0", "1850", "7000000", "65.0");
INSERT INTO "countrylanguage" VALUES ("AAA", "English", "80.0");
INSERT INTO "countrylanguage" VALUES ("AAA", "French", "15.0");
INSERT INTO "countrylanguage" VALUES ("BBB", "Spanish", "90.0");
INSERT INTO "countrylanguage" VALUES ("CCC", "German", "95.0");
INSERT INTO "countrylanguage" VALUES ("DDD", "Italian", "85.0");
INSERT INTO "countrylanguage" VALUES ("EEE", "Portuguese", "70.0");
INSERT INTO "countrylanguage" VALUES ("EEE", "English", "20.0");