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
|
1810 Discussions
|
Please Login in order to post a comment
SELECT COUN.CONTINENT,FLOOR(AVG(CIT.POPULATION)) FROM COUNTRY COUN JOIN CITY CIT ON CIT.COUNTRYCODE = COUN.CODE GROUP BY COUN.CONTINENT; USING ROUND IN PLACE OF FLOOR PRODUCES ERROR I MEAN BOTH DOES THE SAME THING
SELECT country.continent, floor(avg(city.population)) from country join city on city.countrycode = country.code group by country.continent having avg(city.population) is not null order by avg(city.population);
SELECT b1.continent, floor(avg(a1.POPULATION)) FROM CITY a1 right JOIN COUNTRY b1 ON a1.COUNTRYCODE = b1.CODE where b1.continent != 'null' and a1.POPULATION != 'null' GROUP BY b1.CONTINENT
using right join
SELECT b1.CONTINENT,FLOOR(AVG(a1.POPULATION)) FROM CITY a1 INNER JOIN COUNTRY b1 ON a1.CountryCode = b1.Code GROUP BY b1.CONTINENT