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),
"CountryCode" CHAR(3),
"Population" INT,
PRIMARY KEY ("ID"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
"Continent" TEXT,
"Population" INT,
"Capital" INT,
PRIMARY KEY ("Code")
);

CREATE TABLE "countrylanguage" (
"CountryCode" CHAR(3),
"Language" CHAR(30),
"IsOfficial" TEXT,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);





INSERT INTO "country" VALUES ("USA", "United States", "North America", "331000000", "1");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000", "2");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67000000", "3");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "65000000", "4");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe", "83000000", "5");
INSERT INTO "country" VALUES ("ESP", "Spain", "Europe", "47000000", "6");
INSERT INTO "country" VALUES ("ITA", "Italy", "Europe", "59000000", "7");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "Europe", "17000000", "8");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Europe", "11000000", "9");
INSERT INTO "country" VALUES ("AUT", "Austria", "Europe", "9000000", "10");
INSERT INTO "country" VALUES ("CHE", "Switzerland", "Europe", "8000000", "11");
INSERT INTO "country" VALUES ("POL", "Poland", "Europe", "38000000", "12");
INSERT INTO "country" VALUES ("SWE", "Sweden", "Europe", "10000000", "13");
INSERT INTO "country" VALUES ("NOR", "Norway", "Europe", "5000000", "14");
INSERT INTO "country" VALUES ("DNK", "Denmark", "Europe", "5000000", "15");
INSERT INTO "country" VALUES ("FIN", "Finland", "Europe", "5000000", "16");
INSERT INTO "country" VALUES ("IRL", "Ireland", "Europe", "5000000", "17");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000", "18");
INSERT INTO "country" VALUES ("NZL", "New Zealand", "Oceania", "5000000", "19");
INSERT INTO "country" VALUES ("JPN", "Japan", "Asia", "126000000", "20");
INSERT INTO "country" VALUES ("CHN", "China", "Asia", "1400000000", "21");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "1380000000", "22");
INSERT INTO "country" VALUES ("BRA", "Brazil", "South America", "212000000", "23");
INSERT INTO "country" VALUES ("ARG", "Argentina", "South America", "45000000", "24");
INSERT INTO "country" VALUES ("MEX", "Mexico", "North America", "128000000", "25");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Africa", "59000000", "26");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa", "102000000", "27");
INSERT INTO "country" VALUES ("RUS", "Russia", "Europe", "144000000", "28");
INSERT INTO "country" VALUES ("UKR", "Ukraine", "Europe", "44000000", "29");
INSERT INTO "country" VALUES ("GRC", "Greece", "Europe", "10000000", "30");
INSERT INTO "country" VALUES ("PRT", "Portugal", "Europe", "10000000", "31");
INSERT INTO "country" VALUES ("CZE", "Czech Republic", "Europe", "10000000", "32");
INSERT INTO "country" VALUES ("SVK", "Slovakia", "Europe", "5000000", "33");
INSERT INTO "country" VALUES ("HUN", "Hungary", "Europe", "9000000", "34");
INSERT INTO "country" VALUES ("ROU", "Romania", "Europe", "19000000", "35");
INSERT INTO "country" VALUES ("BGR", "Bulgaria", "Europe", "7000000", "36");
INSERT INTO "country" VALUES ("HRV", "Croatia", "Europe", "4000000", "37");
INSERT INTO "country" VALUES ("SRB", "Serbia", "Europe", "7000000", "38");
INSERT INTO "country" VALUES ("BIH", "Bosnia and Herzegovina", "Europe", "3000000", "39");
INSERT INTO "country" VALUES ("ALB", "Albania", "Europe", "2000000", "40");
INSERT INTO "country" VALUES ("MKD", "North Macedonia", "Europe", "2000000", "41");
INSERT INTO "country" VALUES ("MNE", "Montenegro", "Europe", "600000", "42");
INSERT INTO "country" VALUES ("KOS", "Kosovo", "Europe", "1000000", "43");
INSERT INTO "country" VALUES ("ISL", "Iceland", "Europe", "300000", "44");
INSERT INTO "country" VALUES ("MLT", "Malta", "Europe", "500000", "45");
INSERT INTO "country" VALUES ("CYP", "Cyprus", "Europe", "1000000", "46");
INSERT INTO "country" VALUES ("LUX", "Luxembourg", "Europe", "600000", "47");
INSERT INTO "country" VALUES ("LIE", "Liechtenstein", "Europe", "30000", "48");
INSERT INTO "country" VALUES ("SMR", "San Marino", "Europe", "30000", "49");
INSERT INTO "country" VALUES ("VAT", "Vatican City", "Europe", "800", "50");
INSERT INTO "country" VALUES ("MCO", "Monaco", "Europe", "30000", "51");
INSERT INTO "country" VALUES ("AND", "Andorra", "Europe", "70000", "52");
INSERT INTO "country" VALUES ("SJM", "Svalbard and Jan Mayen", "Europe", "2000", "53");
INSERT INTO "country" VALUES ("FRO", "Faroe Islands", "Europe", "50000", "54");
INSERT INTO "country" VALUES ("GIB", "Gibraltar", "Europe", "30000", "55");
INSERT INTO "country" VALUES ("GGY", "Guernsey", "Europe", "60000", "56");
INSERT INTO "country" VALUES ("JEY", "Jersey", "Europe", "100000", "57");
INSERT INTO "country" VALUES ("IMN", "Isle of Man", "Europe", "80000", "58");
INSERT INTO "country" VALUES ("ALA", "Aland Islands", "Europe", "30000", "59");
INSERT INTO "country" VALUES ("SGS", "South Georgia and the South Sandwich Islands", "Antarctica", "30", "60");
INSERT INTO "country" VALUES ("BVT", "Bouvet Island", "Antarctica", "0", "61");
INSERT INTO "country" VALUES ("HMD", "Heard Island and McDonald Islands", "Antarctica", "0", "62");
INSERT INTO "country" VALUES ("ATF", "French Southern Territories", "Antarctica", "100", "63");
INSERT INTO "country" VALUES ("IOT", "British Indian Ocean Territory", "Asia", "4000", "64");
INSERT INTO "country" VALUES ("CCK", "Cocos Keeling Islands", "Asia", "600", "65");
INSERT INTO "country" VALUES ("CXR", "Christmas Island", "Asia", "2000", "66");
INSERT INTO "country" VALUES ("NFK", "Norfolk Island", "Oceania", "2000", "67");
INSERT INTO "country" VALUES ("PCN", "Pitcairn", "Oceania", "50", "68");
INSERT INTO "country" VALUES ("TKL", "Tokelau", "Oceania", "1500", "69");
INSERT INTO "country" VALUES ("WLF", "Wallis and Futuna", "Oceania", "11000", "70");
INSERT INTO "country" VALUES ("COK", "Cook Islands", "Oceania", "17000", "71");
INSERT INTO "country" VALUES ("NIU", "Niue", "Oceania", "1600", "72");
INSERT INTO "country" VALUES ("TUV", "Tuvalu", "Oceania", "11000", "73");
INSERT INTO "country" VALUES ("KIR", "Kiribati", "Oceania", "119000", "74");
INSERT INTO "country" VALUES ("MHL", "Marshall Islands", "Oceania", "59000", "75");
INSERT INTO "country" VALUES ("FSM", "Micronesia Federated States of", "Oceania", "115000", "76");
INSERT INTO "country" VALUES ("PLW", "Palau", "Oceania", "18000", "77");
INSERT INTO "country" VALUES ("NRU", "Nauru", "Oceania", "10000", "78");
INSERT INTO "country" VALUES ("SLB", "Solomon Islands", "Oceania", "680000", "79");
INSERT INTO "country" VALUES ("VUT", "Vanuatu", "Oceania", "300000", "80");
INSERT INTO "country" VALUES ("FJI", "Fiji", "Oceania", "890000", "81");
INSERT INTO "country" VALUES ("TON", "Tonga", "Oceania", "105000", "82");
INSERT INTO "country" VALUES ("WSM", "Samoa", "Oceania", "198000", "83");
INSERT INTO "country" VALUES ("PYF", "French Polynesia", "Oceania", "280000", "84");
INSERT INTO "country" VALUES ("NCL", "New Caledonia", "Oceania", "280000", "85");
INSERT INTO "country" VALUES ("MNP", "Northern Mariana Islands", "Oceania", "57000", "86");
INSERT INTO "country" VALUES ("GUM", "Guam", "Oceania", "168000", "87");
INSERT INTO "country" VALUES ("ASM", "American Samoa", "Oceania", "55000", "88");
INSERT INTO "country" VALUES ("UMI", "United States Minor Outlying Islands", "Oceania", "300", "89");
INSERT INTO "country" VALUES ("FLK", "Falkland Islands Malvinas", "South America", "3000", "90");
INSERT INTO "country" VALUES ("SGS", "South Georgia and the South Sandwich Islands", "Antarctica", "30", "91");
INSERT INTO "country" VALUES ("BVT", "Bouvet Island", "Antarctica", "0", "92");
INSERT INTO "country" VALUES ("HMD", "Heard Island and McDonald Islands", "Antarctica", "0", "93");
INSERT INTO "country" VALUES ("ATF", "French Southern Territories", "Antarctica", "100", "94");
INSERT INTO "country" VALUES ("IOT", "British Indian Ocean Territory", "Asia", "4000", "95");
INSERT INTO "country" VALUES ("CCK", "Cocos Keeling Islands", "Asia", "600", "96");
INSERT INTO "country" VALUES ("CXR", "Christmas Island", "Asia", "2000", "97");
INSERT INTO "country" VALUES ("NFK", "Norfolk Island", "Oceania", "2000", "98");
INSERT INTO "country" VALUES ("PCN", "Pitcairn", "Oceania", "50", "99");
INSERT INTO "country" VALUES ("TKL", "Tokelau", "Oceania", "1500", "100");
INSERT INTO "country" VALUES ("WLF", "Wallis and Futuna", "Oceania", "11000", "101");
INSERT INTO "country" VALUES ("COK", "Cook Islands", "Oceania", "17000", "102");
INSERT INTO "country" VALUES ("NIU", "Niue", "Oceania", "1600", "103");
INSERT INTO "country" VALUES ("TUV", "Tuvalu", "Oceania", "11000", "104");
INSERT INTO "country" VALUES ("KIR", "Kiribati", "Oceania", "119000", "105");
INSERT INTO "country" VALUES ("MHL", "Marshall Islands", "Oceania", "59000", "106");
INSERT INTO "country" VALUES ("FSM", "Micronesia Federated States of", "Oceania", "115000", "107");
INSERT INTO "country" VALUES ("PLW", "Palau", "Oceania", "18000", "108");
INSERT INTO "country" VALUES ("NRU", "Nauru", "Oceania", "10000", "109");
INSERT INTO "country" VALUES ("SLB", "Solomon Islands", "Oceania", "680000", "110");
INSERT INTO "country" VALUES ("VUT", "Vanuatu", "Oceania", "300000", "111");
INSERT INTO "country" VALUES ("FJI", "Fiji", "Oceania", "890000", "112");
INSERT INTO "country" VALUES ("TON", "Tonga", "Oceania", "105000", "113");
INSERT INTO "country" VALUES ("WSM", "Samoa", "Oceania", "198000", "114");
INSERT INTO "country" VALUES ("PYF", "French Polynesia", "Oceania", "280000", "115");
INSERT INTO "country" VALUES ("NCL", "New Caledonia", "Oceania", "280000", "116");
INSERT INTO "country" VALUES ("MNP", "Northern Mariana Islands", "Oceania", "57000", "117");
INSERT INTO "country" VALUES ("GUM", "Guam", "Oceania", "168000", "118");
INSERT INTO "country" VALUES ("ASM", "American Samoa", "Oceania", "55000", "119");
INSERT INTO "country" VALUES ("UMI", "United States Minor Outlying Islands", "Oceania", "300", "120");
INSERT INTO "country" VALUES ("FLK", "Falkland Islands Malvinas", "South America", "3000", "121");
INSERT INTO "country" VALUES ("SGS", "South Georgia and the South Sandwich Islands", "Antarctica", "30", "122");
INSERT INTO "country" VALUES ("BVT", "Bouvet Island", "Antarctica", "0", "123");
INSERT INTO "country" VALUES ("HMD", "Heard Island and McDonald Islands", "Antarctica", "0", "124");
INSERT INTO "country" VALUES ("ATF", "French Southern Territories", "Antarctica", "100", "125");
INSERT INTO "country" VALUES ("IOT", "British Indian Ocean Territory", "Asia", "4000", "126");
INSERT INTO "country" VALUES ("CCK", "Cocos Keeling Islands", "Asia", "600", "127");
INSERT INTO "country" VALUES ("CXR", "Christmas Island", "Asia", "2000", "128");
INSERT INTO "country" VALUES ("NFK", "Norfolk Island", "Oceania", "2000", "129");
INSERT INTO "country" VALUES ("PCN", "Pitcairn", "Oceania", "50", "130");
INSERT INTO "country" VALUES ("TKL", "Tokelau", "Oceania", "1500", "131");
INSERT INTO "country" VALUES ("WLF", "Wallis and Futuna", "Oceania", "11000", "132");
INSERT INTO "country" VALUES ("COK", "Cook Islands", "Oceania", "17000", "133");
INSERT INTO "country" VALUES ("NIU", "Niue", "Oceania", "1600", "134");
INSERT INTO "country" VALUES ("TUV", "Tuvalu", "Oceania", "11000", "135");
INSERT INTO "country" VALUES ("KIR", "Kiribati", "Oceania", "119000", "136");
INSERT INTO "country" VALUES ("MHL", "Marshall Islands", "Oceania", "59000", "137");
INSERT INTO "country" VALUES ("FSM", "Micronesia Federated States of", "Oceania", "115000", "138");
INSERT INTO "country" VALUES ("PLW", "Palau", "Oceania", "18000", "139");
INSERT INTO "country" VALUES ("NRU", "Nauru", "Oceania", "10000", "140");
INSERT INTO "country" VALUES ("SLB", "Solomon Islands", "Oceania", "680000", "141");
INSERT INTO "country" VALUES ("VUT", "Vanuatu", "Oceania", "300000", "142");
INSERT INTO "country" VALUES ("FJI", "Fiji", "Oceania", "890000", "143");
INSERT INTO "country" VALUES ("TON", "Tonga", "Oceania", "105000", "144");
INSERT INTO "country" VALUES ("WSM", "Samoa", "Oceania", "198000", "145");
INSERT INTO "country" VALUES ("PYF", "French Polynesia", "Oceania", "280000", "146");
INSERT INTO "country" VALUES ("NCL", "New Caledonia", "Oceania", "280000", "147");
INSERT INTO "country" VALUES ("MNP", "Northern Mariana Islands", "Oceania", "57000", "148");
INSERT INTO "country" VALUES ("GUM", "Guam", "Oceania", "168000", "149");
INSERT INTO "country" VALUES ("ASM", "American Samoa", "Oceania", "55000", "150");
INSERT INTO "country" VALUES ("UMI", "United States Minor Outlying Islands", "Oceania", "300", "151");
INSERT INTO "country" VALUES ("FLK", "Falkland Islands Malvinas", "South America", "3000", "152");
INSERT INTO "country" VALUES ("SGS", "South Georgia and the South Sandwich Islands", "Antarctica", "30", "153");
INSERT INTO "country" VALUES ("BVT", "Bouvet Island", "Antarctica", "0", "154");
INSERT INTO "country" VALUES ("HMD", "Heard Island and McDonald Islands", "Antarctica", "0", "155");
INSERT INTO "country" VALUES ("ATF", "French Southern Territories", "Antarctica", "100", "156");
INSERT INTO "country" VALUES ("IOT", "British Indian Ocean Territory", "Asia", "4000", "157");
INSERT INTO "country" VALUES ("CCK", "Cocos Keeling Islands", "Asia", "600", "158");
INSERT INTO "country" VALUES ("CXR", "Christmas Island", "Asia", "2000", "159");
INSERT INTO "country" VALUES ("NFK", "Norfolk Island", "Oceania", "2000", "160");
INSERT INTO "country" VALUES ("PCN", "Pitcairn", "Oceania", "50", "161");
INSERT INTO "country" VALUES ("TKL", "Tokelau", "Oceania", "1500", "162");
INSERT INTO "country" VALUES ("WLF", "Wallis and Futuna", "Oceania", "11000", "163");
INSERT INTO "country" VALUES ("COK", "Cook Islands", "Oceania", "17000", "164");
INSERT INTO "country" VALUES ("NIU", "Niue", "Oceania", "1600", "165");
INSERT INTO "country" VALUES ("TUV", "Tuvalu", "Oceania", "11000", "166");
INSERT INTO "country" VALUES ("KIR", "Kiribati", "Oceania", "119000", "167");
INSERT INTO "country" VALUES ("MHL", "Marshall Islands", "Oceania", "59000", "168");
INSERT INTO "country" VALUES ("FSM", "Micronesia Federated States of", "Oceania", "115000", "169");
INSERT INTO "country" VALUES ("PLW", "Palau", "Oceania", "18000", "170");
INSERT INTO "country" VALUES ("NRU", "Nauru", "Oceania", "10000", "171");
INSERT INTO "country" VALUES ("SLB", "Solomon Islands", "Oceania", "680000", "172");
INSERT INTO "country" VALUES ("VUT", "Vanuatu", "Oceania", "300000", "173");
INSERT INTO "country" VALUES ("FJI", "Fiji", "Oceania", "890000", "174");
INSERT INTO "country" VALUES ("TON", "Tonga", "Oceania", "105000", "175");
INSERT INTO "country" VALUES ("WSM", "Samoa", "Oceania", "198000", "176");
INSERT INTO "country" VALUES ("PYF", "French Polynesia", "Oceania", "280000", "177");
INSERT INTO "country" VALUES ("NCL", "New Caledonia", "Oceania", "280000", "178");
INSERT INTO "country" VALUES ("MNP", "Northern Mariana Islands", "Oceania", "57000", "179");
INSERT INTO "country" VALUES ("GUM", "Guam", "Oceania", "168000", "180");
INSERT INTO "country" VALUES ("ASM", "American Samoa", "Oceania", "55000", "181");
INSERT INTO "country" VALUES ("UMI", "United States Minor Outlying Islands", "Oceania", "300", "182");
INSERT INTO "country" VALUES ("FLK", "Falkland Islands Malvinas", "South America", "3000", "183");
INSERT INTO "country" VALUES ("SGS", "South Georgia and the South Sandwich Islands", "Antarctica", "30", "184");
INSERT INTO "country" VALUES ("BVT", "Bouvet Island", "Antarctica", "0", "185");
INSERT INTO "country" VALUES ("HMD", "Heard Island and McDonald Islands", "Antarctica", "0", "186");
INSERT INTO "country" VALUES ("ATF", "French Southern Territories", "Antarctica", "100", "187");
INSERT INTO "country" VALUES ("IOT", "British Indian Ocean Territory", "Asia", "4000", "188");
INSERT INTO "country" VALUES ("CCK", "Cocos Keeling Islands", "Asia", "600", "189");
INSERT INTO "country" VALUES ("CXR", "Christmas Island", "Asia", "2000", "190");
INSERT INTO "country" VALUES ("NFK", "Norfolk Island", "Oceania", "2000", "191");
INSERT INTO "country" VALUES ("PCN", "Pitcairn", "Oceania", "50", "192");
INSERT INTO "country" VALUES ("TKL", "Tokelau", "Oceania", "1500", "193");
INSERT INTO "country" VALUES ("WLF", "Wallis and Futuna", "Oceania", "11000", "194");
INSERT INTO "country" VALUES ("COK", "Cook Islands", "Oceania", "17000", "195");
INSERT INTO "country" VALUES ("NIU", "Niue", "Oceania", "1600", "196");
INSERT INTO "country" VALUES ("TUV", "Tuvalu", "Oceania", "11000", "197");
INSERT INTO "country" VALUES ("KIR", "Kiribati", "Oceania", "119000", "198");
INSERT INTO "country" VALUES ("MHL", "Marshall Islands", "Oceania", "59000", "199");
INSERT INTO "country" VALUES ("FSM", "Micronesia Federated States of", "Oceania", "115000", "200");
INSERT INTO "country" VALUES ("PLW", "Palau", "Oceania", "18000", "201");
INSERT INTO "country" VALUES ("NRU", "Nauru", "Oceania", "10000", "202");
INSERT INTO "country" VALUES ("SLB", "Solomon Islands", "Oceania", "680000", "203");
INSERT INTO "country" VALUES ("VUT", "Vanuatu", "Oceania", "300000", "204");
INSERT INTO "country" VALUES ("FJI", "Fiji", "Oceania", "890000", "205");
INSERT INTO "country" VALUES ("TON", "Tonga", "Oceania", "105000", "206");
INSERT INTO "country" VALUES ("WSM", "Samoa", "Oceania", "198000", "207");
INSERT INTO "country" VALUES ("PYF", "French Polynesia", "Oceania", "280000", "208");
INSERT INTO "country" VALUES ("NCL", "New Caledonia", "Oceania", "280000", "209");
INSERT INTO "country" VALUES ("MNP", "Northern Mariana Islands", "Oceania", "57000", "210");
INSERT INTO "country" VALUES ("GUM", "Guam", "Oceania", "168000", "211");
INSERT INTO "country" VALUES ("ASM", "American Samoa", "Oceania", "55000", "212");
INSERT INTO "country" VALUES ("UMI", "United States Minor Outlying Islands", "Oceania", "300", "213");
INSERT INTO "country" VALUES ("FLK", "Falkland Islands Malvinas", "South America", "3000", "214");
INSERT INTO "country" VALUES ("SGS", "South Georgia and the South Sandwich Islands", "Antarctica", "30", "215");
INSERT INTO "country" VALUES ("BVT", "Bouvet Island", "Antarctica", "0", "216");
INSERT INTO "country" VALUES ("HMD", "Heard Island and McDonald Islands", "Antarctica", "0", "217");
INSERT INTO "country" VALUES ("ATF", "French Southern Territories", "Antarctica", "100", "218");
INSERT INTO "country" VALUES ("IOT", "British Indian Ocean Territory", "Asia", "4000", "219");
INSERT INTO "country" VALUES ("CCK", "Cocos Keeling Islands", "Asia", "600", "220");