Average Population of Each Continent

  • + 0 comments

    MySQL:

    SELECT  
        coun.continent,
        FLOOR(AVG(city.population)) AS avg_population
    FROM country coun
    INNER JOIN city ON coun.code = city.countrycode
    GROUP BY coun.continent;