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.
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
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 →
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