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),
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),
"Percentage" FLOAT,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);





INSERT INTO "city" VALUES ("1", "New York");
INSERT INTO "city" VALUES ("2", "Los Angeles");
INSERT INTO "city" VALUES ("3", "Chicago");
INSERT INTO "city" VALUES ("4", "Houston");
INSERT INTO "city" VALUES ("5", "Phoenix");
INSERT INTO "city" VALUES ("6", "Madrid");
INSERT INTO "city" VALUES ("7", "Barcelona");
INSERT INTO "city" VALUES ("8", "Mexico City");
INSERT INTO "city" VALUES ("9", "Buenos Aires");
INSERT INTO "city" VALUES ("10", "Bogota");
INSERT INTO "country" VALUES ("USA", "United States", "331000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "38000000");
INSERT INTO "country" VALUES ("MEX", "Mexico", "128000000");
INSERT INTO "country" VALUES ("ESP", "Spain", "47000000");
INSERT INTO "country" VALUES ("ARG", "Argentina", "45000000");
INSERT INTO "country" VALUES ("COL", "Colombia", "51000000");
INSERT INTO "country" VALUES ("PER", "Peru", "33000000");
INSERT INTO "country" VALUES ("CHL", "Chile", "19000000");
INSERT INTO "country" VALUES ("VEN", "Venezuela", "28000000");
INSERT INTO "country" VALUES ("CUB", "Cuba", "11000000");
INSERT INTO "country" VALUES ("GTM", "Guatemala", "18000000");
INSERT INTO "country" VALUES ("ECU", "Ecuador", "17000000");
INSERT INTO "country" VALUES ("BOL", "Bolivia", "11000000");
INSERT INTO "country" VALUES ("PRY", "Paraguay", "7000000");
INSERT INTO "country" VALUES ("URY", "Uruguay", "3000000");
INSERT INTO "country" VALUES ("CRI", "Costa Rica", "5000000");
INSERT INTO "country" VALUES ("PAN", "Panama", "4000000");
INSERT INTO "country" VALUES ("DOM", "Dominican Republic", "10000000");
INSERT INTO "country" VALUES ("SLV", "El Salvador", "6000000");
INSERT INTO "country" VALUES ("HND", "Honduras", "9000000");
INSERT INTO "country" VALUES ("NIC", "Nicaragua", "6000000");
INSERT INTO "country" VALUES ("PRI", "Puerto Rico", "3000000");
INSERT INTO "country" VALUES ("BLZ", "Belize", "400000");
INSERT INTO "country" VALUES ("GNQ", "Equatorial Guinea", "1400000");
INSERT INTO "country" VALUES ("PHL", "Philippines", "110000000");
INSERT INTO "country" VALUES ("AND", "Andorra", "80000");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "82.1");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "13.4");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "58.7");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "22.0");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish", "92.7");
INSERT INTO "countrylanguage" VALUES ("ESP", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("ESP", "Catalan", "17.5");
INSERT INTO "countrylanguage" VALUES ("ARG", "Spanish", "98.0");
INSERT INTO "countrylanguage" VALUES ("COL", "Spanish", "99.5");
INSERT INTO "countrylanguage" VALUES ("PER", "Spanish", "84.1");
INSERT INTO "countrylanguage" VALUES ("CHL", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("VEN", "Spanish", "96.9");
INSERT INTO "countrylanguage" VALUES ("CUB", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("GTM", "Spanish", "69.0");
INSERT INTO "countrylanguage" VALUES ("ECU", "Spanish", "93.0");
INSERT INTO "countrylanguage" VALUES ("BOL", "Spanish", "60.7");
INSERT INTO "countrylanguage" VALUES ("PRY", "Spanish", "55.1");
INSERT INTO "countrylanguage" VALUES ("URY", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("CRI", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("PAN", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("DOM", "Spanish", "98.0");
INSERT INTO "countrylanguage" VALUES ("SLV", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("HND", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("NIC", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("PRI", "Spanish", "95.0");
INSERT INTO "countrylanguage" VALUES ("BLZ", "English", "62.9");
INSERT INTO "countrylanguage" VALUES ("BLZ", "Spanish", "56.6");
INSERT INTO "countrylanguage" VALUES ("GNQ", "Spanish", "67.6");
INSERT INTO "countrylanguage" VALUES ("GNQ", "French", "10.0");
INSERT INTO "countrylanguage" VALUES ("PHL", "Filipino", "80.0");
INSERT INTO "countrylanguage" VALUES ("PHL", "English", "40.0");
INSERT INTO "countrylanguage" VALUES ("PHL", "Spanish", "0.01");
INSERT INTO "countrylanguage" VALUES ("AND", "Catalan", "38.0");
INSERT INTO "countrylanguage" VALUES ("AND", "Spanish", "35.0");
INSERT INTO "countrylanguage" VALUES ("AND", "French", "7.0");
INSERT INTO "countrylanguage" VALUES ("AND", "Portuguese", "11.0");