Countries of the world

A reference table of countries and territories: ISO 3166 codes, common and official names, capital, region and subregion, area, borders, top-level domain, coordinates and flag.

Table
demo.geopolitics.countries
Source
mledoze/countries
Preview

The first ten rows

Live from the table, no sign-in needed.

SELECT flag_emoji, country_name_common, capital, region, subregion, area_km2
  FROM demo.geopolitics.countries
 LIMIT 10
Example questions

Ask it something

Run any of these here, or open it in Studio to change the SQL. Studio is free to start: 100 queries a day.

Which are the largest landlocked countries?

SELECT flag_emoji, country_name_common, capital, area_km2
  FROM demo.geopolitics.countries
 WHERE landlocked = TRUE
 ORDER BY area_km2 DESC
 LIMIT 10
Edit in Studio

How many countries are in each region?

SELECT region, COUNT(*) AS countries
  FROM demo.geopolitics.countries
 GROUP BY region
 ORDER BY countries DESC
Edit in Studio
Schema

Columns

ColumnType
iso_alpha2VARCHAR
iso_alpha3VARCHAR
iso_numericVARCHAR
ioc_codeVARCHAR
country_name_commonVARCHAR
country_name_officialVARCHAR
capitalVARCHAR
regionVARCHAR
subregionVARCHAR
area_km2FLOAT64
populationVARCHAR
landlockedBOOL
independentBOOL
un_memberBOOL
tldVARCHAR
latFLOAT64
lngFLOAT64
bordersVARCHAR
flag_emojiVARCHAR