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),
"Population" INT,
"LifeExpectancy" FLOAT,
"GNP" FLOAT,
PRIMARY KEY ("Code")
);

CREATE TABLE "countrylanguage" (
"CountryCode" CHAR(3),
"Language" CHAR(30),
"Percentage" FLOAT,
PRIMARY KEY ("CountryCode", "Language")
);





INSERT INTO "city" VALUES ("1", "12000000");
INSERT INTO "city" VALUES ("2", "3000000");
INSERT INTO "city" VALUES ("3", "500000");
INSERT INTO "city" VALUES ("4", "15000000");
INSERT INTO "city" VALUES ("5", "800000");
INSERT INTO "country" VALUES ("BRA", "Brazil", "211000000", "75.7", "1839758.0");
INSERT INTO "country" VALUES ("USA", "United States", "331000000", "78.9", "21433226.0");
INSERT INTO "country" VALUES ("ARG", "Argentina", "45000000", "76.7", "449663.0");
INSERT INTO "country" VALUES ("CHL", "Chile", "19000000", "80.0", "282318.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "98.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Spanish", "1.5");
INSERT INTO "countrylanguage" VALUES ("BRA", "English", "0.5");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "82.1");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "13.5");
INSERT INTO "countrylanguage" VALUES ("ARG", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("CHL", "Spanish", "99.5");
INSERT INTO "countrylanguage" VALUES ("CHL", "English", "1.0");