We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Average Population of Each Continent
Average Population of Each Continent
Sort by
recency
|
1815 Discussions
|
Please Login in order to post a comment
MYSQL -
SELECT COUNTRY.CONTINENT, FLOOR(AVG(CITY.POPULATION)) FROM COUNTRY JOIN CITY ON CITY.COUNTRYCODE = COUNTRY.CODE GROUP BY COUNTRY.CONTINENT;
select a.CONTINENT, floor(avg(b.POPULATION)) from COUNTRY as a INNER JOIN CITY as b on a.CODE = b.COUNTRYCODE group by CONTINENT;
SELECT COUNTRY.CONTINENT, FLOOR(AVG(CITY.POPULATION)) AS AVG_CITY_POPULATION FROM COUNTRY INNER JOIN CITY ON COUNTRY.CODE = CITY.COUNTRYCODE GROUP BY CONTINENT;
MYSql
SELECT COUNTRY.CONTINENT, FLOOR(AVG(CITY.POPULATION)) FROM COUNTRY INNER JOIN CITY ON COUNTRY.CODE = CITY.COUNTRYCODE GROUP BY COUNTRY.CONTINENT;
SELECT COUNTRY.CONTINENT , FLOOR(AVG(CITY.POPULATION)) FROM CITY, COUNTRY WHERE CITY.COUNTRYCODE = COUNTRY.CODE GROUP BY (COUNTRY.CONTINENT);