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),
"IndepYear" INT,
"Population" 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 "city" VALUES ("1", "New York");
INSERT INTO "city" VALUES ("2", "London");
INSERT INTO "city" VALUES ("3", "Paris");
INSERT INTO "city" VALUES ("4", "Tokyo");
INSERT INTO "city" VALUES ("5", "Berlin");
INSERT INTO "city" VALUES ("6", "Rome");
INSERT INTO "city" VALUES ("7", "Beijing");
INSERT INTO "city" VALUES ("8", "Sydney");
INSERT INTO "city" VALUES ("9", "Cairo");
INSERT INTO "city" VALUES ("10", "Rio de Janeiro");
INSERT INTO "country" VALUES ("USA", "United States", "1776", "330000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "1867", "38000000");
INSERT INTO "country" VALUES ("MEX", "Mexico", "1821", "128000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "1707", "67000000");
INSERT INTO "country" VALUES ("FRA", "France", "843", "65000000");
INSERT INTO "country" VALUES ("DEU", "Germany", "1871", "83000000");
INSERT INTO "country" VALUES ("JPN", "Japan", "660", "126000000");
INSERT INTO "country" VALUES ("CHN", "China", "1949", "1400000000");
INSERT INTO "country" VALUES ("IND", "India", "1947", "1380000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "1901", "25000000");
INSERT INTO "country" VALUES ("BRA", "Brazil", "1822", "215000000");
INSERT INTO "country" VALUES ("EGY", "Egypt", "1922", "102000000");
INSERT INTO "country" VALUES ("ARG", "Argentina", "1816", "45000000");
INSERT INTO "country" VALUES ("COL", "Colombia", "1810", "51000000");
INSERT INTO "country" VALUES ("PER", "Peru", "1821", "33000000");
INSERT INTO "country" VALUES ("CHL", "Chile", "1818", "19000000");
INSERT INTO "country" VALUES ("SWE", "Sweden", "1523", "10000000");
INSERT INTO "country" VALUES ("NOR", "Norway", "1905", "5000000");
INSERT INTO "country" VALUES ("DNK", "Denmark", "965", "5000000");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "1579", "17000000");
INSERT INTO "country" VALUES ("BEL", "Belgium", "1830", "11000000");
INSERT INTO "country" VALUES ("CHE", "Switzerland", "1291", "8000000");
INSERT INTO "country" VALUES ("AUT", "Austria", "976", "9000000");
INSERT INTO "country" VALUES ("ITA", "Italy", "1861", "59000000");
INSERT INTO "country" VALUES ("ESP", "Spain", "1492", "47000000");
INSERT INTO "country" VALUES ("PRT", "Portugal", "1143", "10000000");
INSERT INTO "country" VALUES ("GRC", "Greece", "1821", "10000000");
INSERT INTO "country" VALUES ("TUR", "Turkey", "1923", "84000000");
INSERT INTO "country" VALUES ("RUS", "Russia", "862", "145000000");
INSERT INTO "country" VALUES ("POL", "Poland", "1918", "38000000");
INSERT INTO "country" VALUES ("UKR", "Ukraine", "1991", "43000000");
INSERT INTO "country" VALUES ("KOR", "South Korea", "1948", "51000000");
INSERT INTO "country" VALUES ("VNM", "Vietnam", "1945", "97000000");
INSERT INTO "country" VALUES ("THA", "Thailand", "1238", "70000000");
INSERT INTO "country" VALUES ("IDN", "Indonesia", "1945", "270000000");
INSERT INTO "country" VALUES ("PHL", "Philippines", "1898", "110000000");
INSERT INTO "country" VALUES ("MYS", "Malaysia", "1957", "32000000");
INSERT INTO "country" VALUES ("SGP", "Singapore", "1965", "5000000");
INSERT INTO "country" VALUES ("NZL", "New Zealand", "1907", "5000000");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "1910", "60000000");
INSERT INTO "country" VALUES ("NGA", "Nigeria", "1960", "210000000");
INSERT INTO "country" VALUES ("ETH", "Ethiopia", "1000", "115000000");
INSERT INTO "country" VALUES ("KEN", "Kenya", "1963", "53000000");
INSERT INTO "country" VALUES ("DZA", "Algeria", "1962", "44000000");
INSERT INTO "country" VALUES ("MAR", "Morocco", "788", "37000000");
INSERT INTO "country" VALUES ("SAU", "Saudi Arabia", "1932", "35000000");
INSERT INTO "country" VALUES ("IRN", "Iran", "1501", "85000000");
INSERT INTO "country" VALUES ("IRQ", "Iraq", "1932", "40000000");
INSERT INTO "country" VALUES ("ISR", "Israel", "1948", "9000000");
INSERT INTO "country" VALUES ("PAK", "Pakistan", "1947", "220000000");
INSERT INTO "country" VALUES ("BGD", "Bangladesh", "1971", "165000000");
INSERT INTO "country" VALUES ("AFG", "Afghanistan", "1919", "40000000");
INSERT INTO "country" VALUES ("SYR", "Syria", "1946", "17000000");
INSERT INTO "country" VALUES ("YEM", "Yemen", "1918", "30000000");
INSERT INTO "country" VALUES ("OMN", "Oman", "1650", "5000000");
INSERT INTO "country" VALUES ("ARE", "United Arab Emirates", "1971", "9000000");
INSERT INTO "country" VALUES ("QAT", "Qatar", "1971", "2000000");
INSERT INTO "country" VALUES ("KWT", "Kuwait", "1961", "4000000");
INSERT INTO "country" VALUES ("BHR", "Bahrain", "1971", "1000000");
INSERT INTO "country" VALUES ("CYP", "Cyprus", "1960", "1000000");
INSERT INTO "country" VALUES ("MLT", "Malta", "1964", "500000");
INSERT INTO "country" VALUES ("ISL", "Iceland", "1944", "300000");
INSERT INTO "country" VALUES ("IRL", "Ireland", "1922", "5000000");
INSERT INTO "country" VALUES ("FIN", "Finland", "1917", "5000000");
INSERT INTO "country" VALUES ("EST", "Estonia", "1991", "1000000");
INSERT INTO "country" VALUES ("LVA", "Latvia", "1991", "1000000");
INSERT INTO "country" VALUES ("LTU", "Lithuania", "1991", "2000000");
INSERT INTO "country" VALUES ("BLR", "Belarus", "1991", "9000000");
INSERT INTO "country" VALUES ("MDA", "Moldova", "1991", "2000000");
INSERT INTO "country" VALUES ("ROU", "Romania", "1877", "19000000");
INSERT INTO "country" VALUES ("BGR", "Bulgaria", "1908", "6000000");
INSERT INTO "country" VALUES ("SRB", "Serbia", "2006", "7000000");
INSERT INTO "country" VALUES ("HRV", "Croatia", "1991", "4000000");
INSERT INTO "country" VALUES ("BIH", "Bosnia and Herzegovina", "1992", "3000000");
INSERT INTO "country" VALUES ("MNE", "Montenegro", "2006", "600000");
INSERT INTO "country" VALUES ("ALB", "Albania", "1912", "2000000");
INSERT INTO "country" VALUES ("MKD", "North Macedonia", "1991", "2000000");
INSERT INTO "country" VALUES ("SVN", "Slovenia", "1991", "2000000");
INSERT INTO "country" VALUES ("SVK", "Slovakia", "1993", "5000000");
INSERT INTO "country" VALUES ("CZE", "Czech Republic", "1993", "10000000");
INSERT INTO "country" VALUES ("HUN", "Hungary", "1000", "9000000");
INSERT INTO "country" VALUES ("AUT_OLD", "Old Austria", "1804", "0");
INSERT INTO "country" VALUES ("PRU", "Prussia", "1701", "0");
INSERT INTO "country" VALUES ("RUS_OLD", "Old Russia", "1721", "0");
INSERT INTO "country" VALUES ("OTT", "Ottoman Empire", "1299", "0");
INSERT INTO "country" VALUES ("QIN", "Qing Dynasty", "1644", "0");
INSERT INTO "country" VALUES ("MGL", "Mongol Empire", "1206", "0");
INSERT INTO "country" VALUES ("ROM", "Roman Empire", "27", "0");
INSERT INTO "country" VALUES ("GRC_OLD", "Ancient Greece", "-800", "0");
INSERT INTO "country" VALUES ("EGY_OLD", "Ancient Egypt", "-3100", "0");
INSERT INTO "country" VALUES ("PER_OLD", "Persian Empire", "-550", "0");
INSERT INTO "country" VALUES ("IND_OLD", "Ancient India", "-3300", "0");
INSERT INTO "country" VALUES ("CHN_OLD", "Ancient China", "-2070", "0");
INSERT INTO "country" VALUES ("JPN_OLD", "Ancient Japan", "-660", "0");
INSERT INTO "country" VALUES ("GBR_OLD", "Ancient Britain", "-800", "0");
INSERT INTO "country" VALUES ("FRA_OLD", "Ancient Gaul", "-500", "0");
INSERT INTO "country" VALUES ("DEU_OLD", "Ancient Germania", "-500", "0");
INSERT INTO "country" VALUES ("ESP_OLD", "Ancient Iberia", "-1000", "0");
INSERT INTO "country" VALUES ("ITA_OLD", "Ancient Italy", "-1000", "0");
INSERT INTO "country" VALUES ("USA_OLD", "Colonial America", "1607", "0");
INSERT INTO "country" VALUES ("CAN_OLD", "Colonial Canada", "1534", "0");
INSERT INTO "country" VALUES ("MEX_OLD", "Colonial Mexico", "1521", "0");
INSERT INTO "country" VALUES ("BRA_OLD", "Colonial Brazil", "1500", "0");
INSERT INTO "country" VALUES ("AUS_OLD", "Colonial Australia", "1788", "0");
INSERT INTO "country" VALUES ("NZL_OLD", "Colonial New Zealand", "1642", "0");
INSERT INTO "country" VALUES ("ZAF_OLD", "Colonial South Africa", "1652", "0");
INSERT INTO "country" VALUES ("IND_BRT", "British India", "1757", "0");
INSERT INTO "country" VALUES ("EGY_BRT", "British Egypt", "1882", "0");
INSERT INTO "country" VALUES ("IRL_BRT", "British Ireland", "1801", "0");
INSERT INTO "country" VALUES ("FIN_RUS", "Russian Finland", "1809", "0");
INSERT INTO "country" VALUES ("POL_RUS", "Russian Poland", "1815", "0");
INSERT INTO "country" VALUES ("UKR_RUS", "Russian Ukraine", "1654", "0");
INSERT INTO "country" VALUES ("BLR_RUS", "Russian Belarus", "1772", "0");
INSERT INTO "country" VALUES ("MDA_RUS", "Russian Moldova", "1812", "0");
INSERT INTO "country" VALUES ("EST_RUS", "Russian Estonia", "1721", "0");
INSERT INTO "country" VALUES ("LVA_RUS", "Russian Latvia", "1721", "0");
INSERT INTO "country" VALUES ("LTU_RUS", "Russian Lithuania", "1795", "0");
INSERT INTO "country" VALUES ("CZE_AUT", "Austrian Bohemia", "1526", "0");
INSERT INTO "country" VALUES ("SVK_HUN", "Hungarian Slovakia", "1000", "0");
INSERT INTO "country" VALUES ("HRV_HUN", "Hungarian Croatia", "1102", "0");
INSERT INTO "country" VALUES ("SVN_AUT", "Austrian Slovenia", "1335", "0");
INSERT INTO "country" VALUES ("BIH_AUT", "Austrian Bosnia", "1878", "0");
INSERT INTO "country" VALUES ("SRB_OTT", "Ottoman Serbia", "1459", "0");
INSERT INTO "country" VALUES ("BGR_OTT", "Ottoman Bulgaria", "1396", "0");
INSERT INTO "country" VALUES ("GRC_OTT", "Ottoman Greece", "1453", "0");
INSERT INTO "country" VALUES ("ALB_OTT", "Ottoman Albania", "1479", "0");
INSERT INTO "country" VALUES ("MKD_OTT", "Ottoman Macedonia", "1395", "0");
INSERT INTO "country" VALUES ("ROU_OTT", "Ottoman Romania", "1417", "0");
INSERT INTO "country" VALUES ("TUR_OTT", "Ottoman Turkey", "1299", "0");
INSERT INTO "country" VALUES ("SYR_OTT", "Ottoman Syria", "1516", "0");
INSERT INTO "country" VALUES ("IRQ_OTT", "Ottoman Iraq", "1534", "0");
INSERT INTO "country" VALUES ("ISR_OTT", "Ottoman Palestine", "1516", "0");
INSERT INTO "country" VALUES ("YEM_OTT", "Ottoman Yemen", "1538", "0");
INSERT INTO "country" VALUES ("SAU_OTT", "Ottoman Arabia", "1517", "0");
INSERT INTO "country" VALUES ("EGY_OTT", "Ottoman Egypt", "1517", "0");
INSERT INTO "country" VALUES ("DZA_OTT", "Ottoman Algeria", "1516", "0");
INSERT INTO "country" VALUES ("MAR_OTT", "Ottoman Morocco", "1554", "0");
INSERT INTO "country" VALUES ("TUN_OTT", "Ottoman Tunisia", "1574", "0");
INSERT INTO "country" VALUES ("LBY_OTT", "Ottoman Libya", "1551", "0");
INSERT INTO "country" VALUES ("SUD_OTT", "Ottoman Sudan", "1821", "0");
INSERT INTO "country" VALUES ("ETH_OTT", "Ottoman Ethiopia", "1557", "0");
INSERT INTO "country" VALUES ("SOM_OTT", "Ottoman Somalia", "1884", "0");
INSERT INTO "country" VALUES ("ERI_OTT", "Ottoman Eritrea", "1557", "0");
INSERT INTO "country" VALUES ("DJI_OTT", "Ottoman Djibouti", "1862", "0");
INSERT INTO "country" VALUES ("KWT_OTT", "Ottoman Kuwait", "1521", "0");
INSERT INTO "country" VALUES ("BHR_OTT", "Ottoman Bahrain", "1521", "0");
INSERT INTO "country" VALUES ("QAT_OTT", "Ottoman Qatar", "1521", "0");
INSERT INTO "country" VALUES ("ARE_OTT", "Ottoman UAE", "1521", "0");
INSERT INTO "country" VALUES ("OMN_OTT", "Ottoman Oman", "1507", "0");
INSERT INTO "country" VALUES ("AFG_DRN", "Durrani Empire", "1747", "0");
INSERT INTO "country" VALUES ("PAK_MGL", "Mughal Empire", "1526", "0");
INSERT INTO "country" VALUES ("BGD_MGL", "Mughal Bengal", "1576", "0");
INSERT INTO "country" VALUES ("IND_MGL", "Mughal India", "1526", "0");
INSERT INTO "country" VALUES ("CHN_QIN", "Qing China", "1644", "0");
INSERT INTO "country" VALUES ("KOR_JOS", "Joseon Korea", "1392", "0");
INSERT INTO "country" VALUES ("JPN_TOK", "Tokugawa Japan", "1603", "0");
INSERT INTO "country" VALUES ("VNM_NGU", "Nguyen Dynasty", "1802", "0");
INSERT INTO "country" VALUES ("THA_AYU", "Ayutthaya Kingdom", "1351", "0");
INSERT INTO "country" VALUES ("IDN_MJP", "Majapahit Empire", "1293", "0");
INSERT INTO "country" VALUES ("PHL_SPN", "Spanish Philippines", "1565", "0");
INSERT INTO "country" VALUES ("MYS_MLC", "Malacca Sultanate", "1400", "0");
INSERT INTO "country" VALUES ("SGP_JHR", "Johor Sultanate", "1528", "0");
INSERT INTO "country" VALUES ("BRN_BRN", "Brunei Sultanate", "1368", "0");
INSERT INTO "country" VALUES ("PNG_GER", "German New Guinea", "1884", "0");
INSERT INTO "country" VALUES ("FJI_BRT", "British Fiji", "1874", "0");
INSERT INTO "country" VALUES ("TON_KNG", "Tongan Kingdom", "950", "0");
INSERT INTO "country" VALUES ("WSM_GER", "German Samoa", "1900", "0");
INSERT INTO "country" VALUES ("KIR_BRT", "British Gilbert Islands", "1892", "0");
INSERT INTO "country" VALUES ("SLB_BRT", "British Solomon Islands", "1893", "0");
INSERT INTO "country" VALUES ("VUT_FRN", "French New Hebrides", "1906", "0");
INSERT INTO "country" VALUES ("NCL_FRN", "French New Caledonia", "1853", "0");
INSERT INTO "country" VALUES ("PYF_FRN", "French Polynesia", "1842", "0");
INSERT INTO "country" VALUES ("FSM_GER", "German Micronesia", "1899", "0");
INSERT INTO "country" VALUES ("MHL_GER", "German Marshall Islands", "1885", "0");
INSERT INTO "country" VALUES ("PLW_GER", "German Palau", "1899", "0");
INSERT INTO "country" VALUES ("NRU_GER", "German Nauru", "1888", "0");
INSERT INTO "country" VALUES ("TUV_BRT", "British Ellice Islands", "1892", "0");
INSERT INTO "country" VALUES ("KIR_BRT_OLD", "British Gilbert and Ellice Islands", "1916", "0");
INSERT INTO "country" VALUES ("COK_BRT", "British Cook Islands", "1888", "0");
INSERT INTO "country" VALUES ("NIU_BRT", "British Niue", "1901", "0");
INSERT INTO "country" VALUES ("TKL_BRT", "British Tokelau", "1877", "0");
INSERT INTO "country" VALUES ("WLF_FRN", "French Wallis and Futuna", "1887", "0");
INSERT INTO "country" VALUES ("ASM_USA", "American Samoa", "1899", "0");
INSERT INTO "country" VALUES ("GUM_USA", "American Guam", "1898", "0");
INSERT INTO "country" VALUES ("MNP_USA", "American Northern Mariana Islands", "1947", "0");
INSERT INTO "country" VALUES ("PRI_USA", "American Puerto Rico", "1898", "0");
INSERT INTO "country" VALUES ("VIR_USA", "American Virgin Islands", "1917", "0");
INSERT INTO "country" VALUES ("CUB_SPN", "Spanish Cuba", "1492", "0");
INSERT INTO "country" VALUES ("DOM_SPN", "Spanish Dominican Republic", "1492", "0");
INSERT INTO "country" VALUES ("HTI_FRN", "French Haiti", "1697", "0");
INSERT INTO "country" VALUES ("JAM_BRT", "British Jamaica", "1655", "0");
INSERT INTO "country" VALUES ("BHS_BRT", "British Bahamas", "1718", "0");
INSERT INTO "country" VALUES ("BLZ_BRT", "British Belize", "1862", "0");
INSERT INTO "country" VALUES ("GTM_SPN", "Spanish Guatemala", "1524", "0");
INSERT INTO "country" VALUES ("HND_SPN", "Spanish Honduras", "1524", "0");
INSERT INTO "country" VALUES ("SLV_SPN", "Spanish El Salvador", "1524", "0");
INSERT INTO "country" VALUES ("NIC_SPN", "Spanish Nicaragua", "1524", "0");
INSERT INTO "country" VALUES ("CRI_SPN", "Spanish Costa Rica", "1524", "0");
INSERT INTO "country" VALUES ("PAN_SPN", "Spanish Panama", "1501", "0");
INSERT INTO "country" VALUES ("VEN_SPN", "Spanish Venezuela", "1522", "0");
INSERT INTO "country" VALUES ("ECU_SPN", "Spanish Ecuador", "1532", "0");
INSERT INTO "country" VALUES ("BOL_SPN", "Spanish Bolivia", "1538", "0");
INSERT INTO "country" VALUES ("PRY_SPN", "Spanish Paraguay", "1537", "0");
INSERT INTO "country" VALUES ("URY_SPN", "Spanish Uruguay", "1726", "0");
INSERT INTO "country" VALUES ("GUY_BRT", "British Guyana", "1831", "0");
INSERT INTO "country" VALUES ("SUR_NLD", "Dutch Suriname", "1667", "0");
INSERT INTO "country" VALUES ("GUF_FRN", "French Guiana", "1604", "0");
INSERT INTO "country" VALUES ("FLK_BRT", "British Falkland Islands", "1833", "0");
INSERT INTO "country" VALUES ("SGS_BRT", "British South Georgia and South Sandwich Islands", "1775", "0");
INSERT INTO "country" VALUES ("HMD_AUS", "Australian Heard Island and McDonald Islands", "1947", "0");
INSERT INTO "country" VALUES ("ATF_FRN", "French Southern and Antarctic Lands", "1772", "0");
INSERT INTO "country" VALUES ("BVT_NOR", "Norwegian Bouvet Island", "1825", "0");
INSERT INTO "country" VALUES ("PCN_BRT", "British Pitcairn Islands", "1790", "0");
INSERT INTO "country" VALUES ("SHN_BRT", "British Saint Helena, Ascension and Tristan da Cunha", "1659", "0");
INSERT INTO "country" VALUES ("FRO_DNK", "Danish Faroe Islands", "1035", "0");
INSERT INTO "country" VALUES ("GRL_DNK", "Danish Greenland", "986", "0");
INSERT INTO "country" VALUES ("SJM_NOR", "Norwegian Svalbard and Jan Mayen", "1920", "0");
INSERT INTO "country" VALUES ("ALA_FIN", "Finnish Åland Islands", "1921", "0");
INSERT INTO "country" VALUES ("GIB_BRT", "British Gibraltar", "1713", "0");
INSERT INTO "country" VALUES ("GGY_BRT", "British Guernsey", "1066", "0");
INSERT INTO "country" VALUES ("JEY_BRT", "British Jersey", "1066", "0");
INSERT INTO "country" VALUES ("IMN_BRT", "British Isle of Man", "1765", "0");
INSERT INTO "country" VALUES ("MCO_FRN", "French Monaco", "1297", "0");
INSERT INTO "country" VALUES ("SMR_ITA", "Italian San Marino", "301", "0");
INSERT INTO "country" VALUES ("VAT_ITA", "Italian Vatican City", "1929", "0");
INSERT INTO "country" VALUES ("AND_FRN", "French Andorra", "1278", "0");
INSERT INTO "country" VALUES ("LIE_AUT", "Austrian Liechtenstein", "1719", "0");
INSERT INTO "country" VALUES ("LUX_NLD", "Dutch Luxembourg", "1815", "0");
INSERT INTO "country" VALUES ("MLT_BRT", "British Malta", "1814", "0");
INSERT INTO "country" VALUES ("CYP_BRT", "British Cyprus", "1878", "0");
INSERT INTO "country" VALUES ("GEO_RUS", "Russian Georgia", "1801", "0");
INSERT INTO "country" VALUES ("ARM_RUS", "Russian Armenia", "1828", "0");
INSERT INTO "country" VALUES ("AZE_RUS", "Russian Azerbaijan", "1813", "0");
INSERT INTO "country" VALUES ("KAZ_RUS", "Russian Kazakhstan", "1731", "0");
INSERT INTO "country" VALUES ("KGZ_RUS", "Russian Kyrgyzstan", "1876", "0");
INSERT INTO "country" VALUES ("TJK_RUS", "Russian Tajikistan", "1868", "0");