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,
"Population" INT,
"HeadOfState" CHAR(60),
PRIMARY KEY ("Code")
);

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





INSERT INTO "city" VALUES ("1", "8000000");
INSERT INTO "city" VALUES ("2", "1500000");
INSERT INTO "city" VALUES ("3", "300000");
INSERT INTO "city" VALUES ("4", "12000000");
INSERT INTO "city" VALUES ("5", "500000");
INSERT INTO "city" VALUES ("6", "2000000");
INSERT INTO "city" VALUES ("7", "1000000");
INSERT INTO "city" VALUES ("8", "750000");
INSERT INTO "city" VALUES ("9", "450000");
INSERT INTO "city" VALUES ("10", "600000");
INSERT INTO "country" VALUES ("USA", "United States of America", "9833520.0", "331000000", "Joe Biden");
INSERT INTO "country" VALUES ("CAN", "Canada", "9984670.0", "38000000", "Justin Trudeau");
INSERT INTO "country" VALUES ("RUS", "Russia", "17098242.0", "146000000", "Vladimir Putin");
INSERT INTO "country" VALUES ("CHN", "China", "9596961.0", "1402000000", "Xi Jinping");
INSERT INTO "country" VALUES ("BRA", "Brazil", "8515767.0", "212600000", "Jair Bolsonaro");
INSERT INTO "country" VALUES ("AUS", "Australia", "7692024.0", "25600000", "Scott Morrison");
INSERT INTO "country" VALUES ("IND", "India", "3287263.0", "1380000000", "Narendra Modi");
INSERT INTO "country" VALUES ("FRA", "France", "551695.0", "67000000", "Emmanuel Macron");
INSERT INTO "country" VALUES ("ESP", "Spain", "505990.0", "47000000", "Pedro Sánchez");
INSERT INTO "country" VALUES ("NOR", "Norway", "385207.0", "5400000", "NULL");
INSERT INTO "country" VALUES ("SWE", "Sweden", "450295.0", "10300000", "Stefan Löfven");
INSERT INTO "country" VALUES ("NZL", "New Zealand", "268838.0", "5000000", "Jacinda Ardern");
INSERT INTO "country" VALUES ("MEX", "Mexico", "1964375.0", "128900000", "Andrés Manuel López Obrador");
INSERT INTO "country" VALUES ("EGY", "Egypt", "1002450.0", "102000000", "Abdel Fattah el-Sisi");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "1219090.0", "59300000", "Cyril Ramaphosa");
INSERT INTO "country" VALUES ("KAZ", "Kazakhstan", "2724900.0", "18770000", "Kassym-Jomart Tokayev");
INSERT INTO "country" VALUES ("DZA", "Algeria", "2381741.0", "43000000", "Abdelmadjid Tebboune");
INSERT INTO "country" VALUES ("SAU", "Saudi Arabia", "2149690.0", "34800000", "Salman bin Abdulaziz");
INSERT INTO "country" VALUES ("IDN", "Indonesia", "1904569.0", "273500000", "Joko Widodo");
INSERT INTO "country" VALUES ("ARG", "Argentina", "2780400.0", "45100000", "Alberto Fernández");
INSERT INTO "country" VALUES ("KWT", "Kuwait", "17818.0", "4200000", "Nawaf Al-Ahmad Al-Jaber Al-Sabah");
INSERT INTO "country" VALUES ("LUX", "Luxembourg", "2586.0", "626000", "Henri");
INSERT INTO "country" VALUES ("VAT", "Vatican City", "0.44", "800", "NULL");
INSERT INTO "country" VALUES ("MCO", "Monaco", "2.02", "39000", "Albert II");
INSERT INTO "country" VALUES ("SGP", "Singapore", "728.3", "5700000", "Halimah Yacob");
INSERT INTO "country" VALUES ("BRN", "Brunei", "576.0", "430000", "Hassanal Bolkiah");
INSERT INTO "country" VALUES ("LIE", "Liechtenstein", "160.0", "38000", "Hans-Adam II");
INSERT INTO "country" VALUES ("AND", "Andorra", "468.0", "77000", "Joan Enric Vives Sicília");
INSERT INTO "country" VALUES ("ISL", "Iceland", "103000.0", "360000", "Guðni Th. Jóhannesson");
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 ("CHN", "Mandarin", "70.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Cantonese", "5.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "98.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "72.0");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "41.0");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "12.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "88.0");
INSERT INTO "countrylanguage" VALUES ("ESP", "Spanish", "99.0");
INSERT INTO "countrylanguage" VALUES ("NOR", "Norwegian", "95.0");
INSERT INTO "countrylanguage" VALUES ("SWE", "Swedish", "89.0");
INSERT INTO "countrylanguage" VALUES ("NZL", "English", "89.0");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish", "92.0");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "98.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu", "24.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Xhosa", "16.0");
INSERT INTO "countrylanguage" VALUES ("KAZ", "Kazakh", "64.0");
INSERT INTO "countrylanguage" VALUES ("KAZ", "Russian", "20.0");
INSERT INTO "countrylanguage" VALUES ("DZA", "Arabic", "80.0");
INSERT INTO "countrylanguage" VALUES ("SAU", "Arabic", "90.0");
INSERT INTO "countrylanguage" VALUES ("IDN", "Indonesian", "88.0");
INSERT INTO "countrylanguage" VALUES ("ARG", "Spanish", "97.0");
INSERT INTO "countrylanguage" VALUES ("KWT", "Arabic", "75.0");
INSERT INTO "countrylanguage" VALUES ("LUX", "Luxembourgish", "60.0");
INSERT INTO "countrylanguage" VALUES ("VAT", "Italian", "100.0");
INSERT INTO "countrylanguage" VALUES ("MCO", "French", "100.0");
INSERT INTO "countrylanguage" VALUES ("SGP", "English", "36.0");
INSERT INTO "countrylanguage" VALUES ("SGP", "Mandarin", "35.0");
INSERT INTO "countrylanguage" VALUES ("BRN", "Malay", "65.0");
INSERT INTO "countrylanguage" VALUES ("LIE", "German", "90.0");
INSERT INTO "countrylanguage" VALUES ("AND", "Catalan", "85.0");
INSERT INTO "countrylanguage" VALUES ("ISL", "Icelandic", "95.0");