Average Population of Each Continent Solution
Hello Friends in this article i am gone to share Hacker Rank SQL Solutions with you | Average Population of Each Continent Solution
Also Visit: African Cities Solution
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.
The CITY and COUNTRY tables are described as follows:
Solution – Average Population of Each Continent
select country.continent, floor(avg(city.population)) from country join city on city.countrycode = country.code group by country.continent;
The average population during a calendar year is calculated as the arithmetic mean of the population on 1st January of two consecutive years. The average population is further used in the calculation of demographic indicators, like the crude rates per 1 000 inhabitants, and for some ‘per capita’ indicators.
What is the average of the world population?
- 8 Billion
Disclaimer: The above Problems are generated by Hacker Rank but the Solutions are Provided by NYANDER.COM. All Hacker Rank SQL Solutions Shared only for Educational and Learning Purpose.