
CREATE TABLE city (
	"ID" INTEGER NOT NULL, 
	"Name" CHAR(35) DEFAULT '' NOT NULL, 
	"CountryCode" CHAR(3) DEFAULT '' NOT NULL, 
	"District" CHAR(20) DEFAULT '' NOT NULL, 
	"Population" INTEGER DEFAULT '0' NOT NULL, 
	PRIMARY KEY ("ID"), 
	FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)


CREATE TABLE country (
	"Code" CHAR(3) DEFAULT '' NOT NULL, 
	"Name" CHAR(52) DEFAULT '' NOT NULL, 
	"Continent" TEXT DEFAULT 'Asia' NOT NULL, 
	"Region" CHAR(26) DEFAULT '' NOT NULL, 
	"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL, 
	"IndepYear" INTEGER DEFAULT NULL, 
	"Population" INTEGER DEFAULT '0' NOT NULL, 
	"LifeExpectancy" FLOAT DEFAULT NULL, 
	"GNP" FLOAT DEFAULT NULL, 
	"GNPOld" FLOAT DEFAULT NULL, 
	"LocalName" CHAR(45) DEFAULT '' NOT NULL, 
	"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL, 
	"HeadOfState" CHAR(60) DEFAULT NULL, 
	"Capital" INTEGER DEFAULT NULL, 
	"Code2" CHAR(2) DEFAULT '' NOT NULL, 
	PRIMARY KEY ("Code")
)


CREATE TABLE countrylanguage (
	"CountryCode" CHAR(3) DEFAULT '' NOT NULL, 
	"Language" CHAR(30) DEFAULT '' NOT NULL, 
	"IsOfficial" TEXT DEFAULT 'F' NOT NULL, 
	"Percentage" FLOAT DEFAULT '0.0' NOT NULL, 
	PRIMARY KEY ("CountryCode", "Language"), 
	FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)

CREATE TABLE city (
	"ID" INTEGER NOT NULL, 
	"Name" CHAR(35) DEFAULT '' NOT NULL, 
	"CountryCode" CHAR(3) DEFAULT '' NOT NULL, 
	"District" CHAR(20) DEFAULT '' NOT NULL, 
	"Population" INTEGER DEFAULT '0' NOT NULL, 
	PRIMARY KEY ("ID"), 
	FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)

/*
2 rows from city table:
ID	Name	CountryCode	District	Population
1	Kabul	AFG	Kabol	1780000
2	Qandahar	AFG	Qandahar	237500
*/


CREATE TABLE country (
	"Code" CHAR(3) DEFAULT '' NOT NULL, 
	"Name" CHAR(52) DEFAULT '' NOT NULL, 
	"Continent" TEXT DEFAULT 'Asia' NOT NULL, 
	"Region" CHAR(26) DEFAULT '' NOT NULL, 
	"SurfaceArea" FLOAT DEFAULT '0.00' NOT NULL, 
	"IndepYear" INTEGER DEFAULT NULL, 
	"Population" INTEGER DEFAULT '0' NOT NULL, 
	"LifeExpectancy" FLOAT DEFAULT NULL, 
	"GNP" FLOAT DEFAULT NULL, 
	"GNPOld" FLOAT DEFAULT NULL, 
	"LocalName" CHAR(45) DEFAULT '' NOT NULL, 
	"GovernmentForm" CHAR(45) DEFAULT '' NOT NULL, 
	"HeadOfState" CHAR(60) DEFAULT NULL, 
	"Capital" INTEGER DEFAULT NULL, 
	"Code2" CHAR(2) DEFAULT '' NOT NULL, 
	PRIMARY KEY ("Code")
)

/*
2 rows from country table:
Code	Name	Continent	Region	SurfaceArea	IndepYear	Population	LifeExpectancy	GNP	GNPOld	LocalName	GovernmentForm	HeadOfState	Capital	Code2
ABW	Aruba	North America	Caribbean	193.0000000000	None	103000	78.4000000000	828.0000000000	793.0000000000	Aruba	Nonmetropolitan Territory of The Netherlands	Beatrix	129	AW
AFG	Afghanistan	Asia	Southern and Central Asia	652090.0000000000	1919	22720000	45.9000000000	5976.0000000000	None	Afganistan/Afqanestan	Islamic Emirate	Mohammad Omar	1	AF
*/


CREATE TABLE countrylanguage (
	"CountryCode" CHAR(3) DEFAULT '' NOT NULL, 
	"Language" CHAR(30) DEFAULT '' NOT NULL, 
	"IsOfficial" TEXT DEFAULT 'F' NOT NULL, 
	"Percentage" FLOAT DEFAULT '0.0' NOT NULL, 
	PRIMARY KEY ("CountryCode", "Language"), 
	FOREIGN KEY("CountryCode") REFERENCES country ("Code")
)

/*
2 rows from countrylanguage table:
CountryCode	Language	IsOfficial	Percentage
ABW	Dutch	T	5.3000000000
ABW	English	F	9.5000000000
*/
What are the countries that have greater surface area than any country in Europe?
SELECT Name FROM country WHERE SurfaceArea  >  (SELECT min(SurfaceArea) FROM country WHERE Continent  =  "Europe")
[{'Name': 'Aruba'}, {'Name': 'Afghanistan'}, {'Name': 'Angola'}, {'Name': 'Anguilla'}, {'Name': 'Albania'}, {'Name': 'Andorra'}, {'Name': 'Netherlands Antilles'}, {'Name': 'United Arab Emirates'}, {'Name': 'Argentina'}, {'Name': 'Armenia'}, {'Name': 'American Samoa'}, {'Name': 'Antarctica'}, {'Name': 'French Southern territories'}, {'Name': 'Antigua and Barbuda'}, {'Name': 'Australia'}, {'Name': 'Austria'}, {'Name': 'Azerbaijan'}, {'Name': 'Burundi'}, {'Name': 'Belgium'}, {'Name': 'Benin'}, {'Name': 'Burkina Faso'}, {'Name': 'Bangladesh'}, {'Name': 'Bulgaria'}, {'Name': 'Bahrain'}, {'Name': 'Bahamas'}, {'Name': 'Bosnia and Herzegovina'}, {'Name': 'Belarus'}, {'Name': 'Belize'}, {'Name': 'Bermuda'}, {'Name': 'Bolivia'}, {'Name': 'Brazil'}, {'Name': 'Barbados'}, {'Name': 'Brunei'}, {'Name': 'Bhutan'}, {'Name': 'Bouvet Island'}, {'Name': 'Botswana'}, {'Name': 'Central African Republic'}, {'Name': 'Canada'}, {'Name': 'Cocos (Keeling) Islands'}, {'Name': 'Switzerland'}, {'Name': 'Chile'}, {'Name': 'China'}, {'Name': 'Côte d’Ivoire'}, {'Name': 'Cameroon'}, {'Name': 'Congo, The Democratic Republic of the'}, {'Name': 'Congo'}, {'Name': 'Cook Islands'}, {'Name': 'Colombia'}, {'Name': 'Comoros'}, {'Name': 'Cape Verde'}, {'Name': 'Costa Rica'}, {'Name': 'Cuba'}, {'Name': 'Christmas Island'}, {'Name': 'Cayman Islands'}, {'Name': 'Cyprus'}, {'Name': 'Czech Republic'}, {'Name': 'Germany'}, {'Name': 'Djibouti'}, {'Name': 'Dominica'}, {'Name': 'Denmark'}, {'Name': 'Dominican Republic'}, {'Name': 'Algeria'}, {'Name': 'Ecuador'}, {'Name': 'Egypt'}, {'Name': 'Eritrea'}, {'Name': 'Western Sahara'}, {'Name': 'Spain'}, {'Name': 'Estonia'}, {'Name': 'Ethiopia'}, {'Name': 'Finland'}, {'Name': 'Fiji Islands'}, {'Name': 'Falkland Islands'}, {'Name': 'France'}, {'Name': 'Faroe Islands'}, {'Name': 'Micronesia, Federated States of'}, {'Name': 'Gabon'}, {'Name': 'United Kingdom'}, {'Name': 'Georgia'}, {'Name': 'Ghana'}, {'Name': 'Gibraltar'}, {'Name': 'Guinea'}, {'Name': 'Guadeloupe'}, {'Name': 'Gambia'}, {'Name': 'Guinea-Bissau'}, {'Name': 'Equatorial Guinea'}, {'Name': 'Greece'}, {'Name': 'Grenada'}, {'Name': 'Greenland'}, {'Name': 'Guatemala'}, {'Name': 'French Guiana'}, {'Name': 'Guam'}, {'Name': 'Guyana'}, {'Name': 'Hong Kong'}, {'Name': 'Heard Island and McDonald Islands'}, {'Name': 'Honduras'}, {'Name': 'Croatia'}, {'Name': 'Haiti'}, {'Name': 'Hungary'}, {'Name': 'Indonesia'}, {'Name': 'India'}, {'Name': 'British Indian Ocean Territory'}, {'Name': 'Ireland'}, {'Name': 'Iran'}, {'Name': 'Iraq'}, {'Name': 'Iceland'}, {'Name': 'Israel'}, {'Name': 'Italy'}, {'Name': 'Jamaica'}, {'Name': 'Jordan'}, {'Name': 'Japan'}, {'Name': 'Kazakstan'}, {'Name': 'Kenya'}, {'Name': 'Kyrgyzstan'}, {'Name': 'Cambodia'}, {'Name': 'Kiribati'}, {'Name': 'Saint Kitts and Nevis'}, {'Name': 'South Korea'}, {'Name': 'Kuwait'}, {'Name': 'Laos'}, {'Name': 'Lebanon'}, {'Name': 'Liberia'}, {'Name': 'Libyan Arab Jamahiriya'}, {'Name': 'Saint Lucia'}, {'Name': 'Liechtenstein'}, {'Name': 'Sri Lanka'}, {'Name': 'Lesotho'}, {'Name': 'Lithuania'}, {'Name': 'Luxembourg'}, {'Name': 'Latvia'}, {'Name': 'Macao'}, {'Name': 'Morocco'}, {'Name': 'Monaco'}, {'Name': 'Moldova'}, {'Name': 'Madagascar'}, {'Name': 'Maldives'}, {'Name': 'Mexico'}, {'Name': 'Marshall Islands'}, {'Name': 'Macedonia'}, {'Name': 'Mali'}, {'Name': 'Malta'}, {'Name': 'Myanmar'}, {'Name': 'Mongolia'}, {'Name': 'Northern Mariana Islands'}, {'Name': 'Mozambique'}, {'Name': 'Mauritania'}, {'Name': 'Montserrat'}, {'Name': 'Martinique'}, {'Name': 'Mauritius'}, {'Name': 'Malawi'}, {'Name': 'Malaysia'}, {'Name': 'Mayotte'}, {'Name': 'Namibia'}, {'Name': 'New Caledonia'}, {'Name': 'Niger'}, {'Name': 'Norfolk Island'}, {'Name': 'Nigeria'}, {'Name': 'Nicaragua'}, {'Name': 'Niue'}, {'Name': 'Netherlands'}, {'Name': 'Norway'}, {'Name': 'Nepal'}, {'Name': 'Nauru'}, {'Name': 'New Zealand'}, {'Name': 'Oman'}, {'Name': 'Pakistan'}, {'Name': 'Panama'}, {'Name': 'Pitcairn'}, {'Name': 'Peru'}, {'Name': 'Philippines'}, {'Name': 'Palau'}, {'Name': 'Papua New Guinea'}, {'Name': 'Poland'}, {'Name': 'Puerto Rico'}, {'Name': 'North Korea'}, {'Name': 'Portugal'}, {'Name': 'Paraguay'}, {'Name': 'Palestine'}, {'Name': 'French Polynesia'}, {'Name': 'Qatar'}, {'Name': 'Réunion'}, {'Name': 'Romania'}, {'Name': 'Russian Federation'}, {'Name': 'Rwanda'}, {'Name': 'Saudi Arabia'}, {'Name': 'Sudan'}, {'Name': 'Senegal'}, {'Name': 'Singapore'}, {'Name': 'South Georgia and the South Sandwich Islands'}, {'Name': 'Saint Helena'}, {'Name': 'Svalbard and Jan Mayen'}, {'Name': 'Solomon Islands'}, {'Name': 'Sierra Leone'}, {'Name': 'El Salvador'}, {'Name': 'San Marino'}, {'Name': 'Somalia'}, {'Name': 'Saint Pierre and Miquelon'}, {'Name': 'Sao Tome and Principe'}, {'Name': 'Suriname'}, {'Name': 'Slovakia'}, {'Name': 'Slovenia'}, {'Name': 'Sweden'}, {'Name': 'Swaziland'}, {'Name': 'Seychelles'}, {'Name': 'Syria'}, {'Name': 'Turks and Caicos Islands'}, {'Name': 'Chad'}, {'Name': 'Togo'}, {'Name': 'Thailand'}, {'Name': 'Tajikistan'}, {'Name': 'Tokelau'}, {'Name': 'Turkmenistan'}, {'Name': 'East Timor'}, {'Name': 'Tonga'}, {'Name': 'Trinidad and Tobago'}, {'Name': 'Tunisia'}, {'Name': 'Turkey'}, {'Name': 'Tuvalu'}, {'Name': 'Taiwan'}, {'Name': 'Tanzania'}, {'Name': 'Uganda'}, {'Name': 'Ukraine'}, {'Name': 'United States Minor Outlying Islands'}, {'Name': 'Uruguay'}, {'Name': 'United States'}, {'Name': 'Uzbekistan'}, {'Name': 'Saint Vincent and the Grenadines'}, {'Name': 'Venezuela'}, {'Name': 'Virgin Islands, British'}, {'Name': 'Virgin Islands, U.S.'}, {'Name': 'Vietnam'}, {'Name': 'Vanuatu'}, {'Name': 'Wallis and Futuna'}, {'Name': 'Samoa'}, {'Name': 'Yemen'}, {'Name': 'Yugoslavia'}, {'Name': 'South Africa'}, {'Name': 'Zambia'}, {'Name': 'Zimbabwe'}]