Skip to content

Instantly share code, notes, and snippets.

Last active Jun 14, 2018
What would you like to do?
co.Code '_id',
co.Code 'code', 'name',
co.Continent 'continent',
co.region 'region',
co.SurfaceArea 'surface_area',
co.IndepYear 'year_of_independence',
co.Population 'population',
co.LifeExpectancy 'life_expectancy',
co.GovernmentForm 'government_form',
co.Code2 'iso_code',
capital.ID '',
capital.Name '',
capital.District 'capital.district',
capital.Population 'capital.population',
ci.Name 'cities[name]', 'cities[id]',
ci.District 'cities[district]',
ci.Population 'cities[population]',
cl.Language 'languages[language]',
cl.IsOfficial 'languages[official]',
cl.Percentage 'languages[percentage]'
from country co
left outer join city capital ON capital.ID = co.Capital
left outer join city ci ON ci.CountryCode = co.Code
left outer join countrylanguage cl on cl.CountryCode = co.Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment