June 23, 2017 Average Population | SQL – HackerRank Given the CITY and COUNTRY tables, query the names of all the continents (COUNTRY.Continent) and their respective average city populations (CITY.Population) rounded down to the nearest integer. Note: CITY.CountryCode and COUNTRY.Code are matching key columns. Do not include continents without cities in your output. Input Format The CITY and COUNTRY tables are described as follows: Query: select country.continent, floor(AVG(city.population))from country INNER JOIN city ON city.countrycode=country.code group by country.continent Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Google+ (Opens in new window)MoreClick to share on LinkedIn (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email this to a friend (Opens in new window)Click to print (Opens in new window)Like this:Like Loading... Related Related Posts Left Rotation | Data structures N Integers – Sum S – All Combinations Collatz Sequence Sum About The Author admin Add a Comment Cancel reply Your email address will not be published. Required fields are marked *Comment:*Name:* Email Address:* Website: Notify me of follow-up comments by email. Notify me of new posts by email.