Average Population of Each Continent

Sort by

recency

|

1769 Discussions

|

  • + 0 comments

    Given the CITY and COUNTRY tables, query the names of all the continents (COUNTRY.Continent) and their respective average city populations (CITY.Population) rounded down to the nearest integer.

  • + 0 comments

    SELECT CN.CONTINENT,FLOOR(AVG(C.POPULATION)) FROM CITY C INNER JOIN COUNTRY CN ON C.COUNTRYCODE=CN.CODE GROUP BY CN.CONTINENT;

  • + 0 comments

    SELECT CONTINENT, ROUND(AVG(CITY.POPULATION),0) FROM COUNTRY JOIN CITY ON COUNTRYCODE = CODE GROUP BY CONTINENT;==================================Africa 274439 Asia 693038 Europe 175138 Oceania 109189 South America 147435=============

  • + 0 comments

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

  • + 1 comment

    This query shows me wrong answer if I use ROUND instead of FLOOR. Can anyone tell me the reason?