Hacker Rank SQL

Japan Population Solution

Hello Friends in this article i am gone to share Hacker Rank SQL Solutions with you | Japan Population Solution


Also Visit:ย  Average Population Solution


 

Problem

Query the sum of the populations for all Japanese cities inย CITY. Theย COUNTRYCODEย for Japan isย JPN.

Input Format

Theย CITYย table is described as follows:

Field Type
ID NUMBER
NAME VARCHAR2(17)
COUNTRYCODE VARCHAR2(3)
DISTRICT VARCHAR2(20)
POPULATION NUMBER

 

Solution โ€“ Japan Population

MySQL Code
select sum(population) from city where countrycode='JPN';

 


As of August 2023, Japan has a population of almost 125 million, of which nearly 122 million are Japanese nationals. A small population of foreign residents makes up the remainder. In 2019, 92% of the total Japanese population lived in cities. The capital city, Tokyo, has a population of 13.9 millionโต.

As of August 2023, the population density in Japan is 338 per Kmยฒ (876 people per miยฒ) with a total land area of 364,555 Kmยฒ (140,755 sq. miles).

Population of Tokyo

The greater Tokyo metropolitan area, which is spread over 3 prefectures, is much larger and has a population that is estimated to be over 36 million. That means the greater Tokyo area is home to 25% of Japan ‘s population, and it’s the most populous metropolitan area in the world.

 

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.