Average Population of Each Continent

  • + 0 comments
     SELECT ctr.continent
    , sum(ct.population) div count(ct.name) as avg_city_population
    from city ct
    join country ctr 
    on ct.countrycode = ctr.code
    GROUP BY ctr.continent;