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.
why is that so? Can you please explain? I wrote the code similar without what you mentioned. It didnt work. But, when I used your suggestion, it works!
select country.continent, round(avg(city.population),0)
from country inner join city on
country.code=city.countrycode
group by country.continent;
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Average Population of Each Continent
You are viewing a single comment's thread. Return to all comments →
why is that so? Can you please explain? I wrote the code similar without what you mentioned. It didnt work. But, when I used your suggestion, it works!
select country.continent, round(avg(city.population),0) from country inner join city on country.code=city.countrycode group by country.continent;