Average Population of Each 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