Average Population of Each Continent

Sort by

recency

|

1690 Discussions

|

  • + 0 comments

    select country.continent ,floor(avg(city.population)) from city,country where city.countrycode = country.code group by country.continent

  • + 0 comments

    select country.continent, floor(avg(city.population)) from city left join country on city.countrycode = country.code where country.continent is not null group by country.continent

  • + 0 comments
    SELECT
        b.CONTINENT AS Continent,
        FLOOR(AVG(a.POPULATION)) AS media
    FROM
        CITY a
        LEFT JOIN COUNTRY b
        ON UPPER(a.COUNTRYCODE) = UPPER(b.CODE)
    WHERE
        b.CONTINENT IS NOT NULL
    GROUP BY
        b.CONTINENT
    
  • + 0 comments

    Spent so much time, because of a detail...

    Tip:

    [...] and their respective average city populations (CITY.Population) rounded down to the nearest integer

  • + 0 comments

    select co.continent,floor(avg(c.population)) from city c,country co where c.countrycode=co.code group by co.continent