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.
with dable1 as (
select countrycode, floor(avg(population)) avpop
from city
group by countrycode
)
select c.continent , floor(avg(d.avpop))
from country c
inner join dable1 d on c.code = d.countrycode
group by c.continent;
Theresult is wrong but does anyone knows why?
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 →
with dable1 as ( select countrycode, floor(avg(population)) avpop from city group by countrycode ) select c.continent , floor(avg(d.avpop)) from country c inner join dable1 d on c.code = d.countrycode group by c.continent; Theresult is wrong but does anyone knows why?