Algorithm


Problem Name: Sql - Japan Population

Problem Link: https://www.hackerrank.com/challenges/japan-population/problem?isFullScreen=true

In this HackerRank Functions in SQL problem solution,

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:

 

 

Code Examples

#1 Code Example with SQL

Code - SQL


SELECT SUM(POPULATION) FROM CITY
WHERE COUNTRYCODE = 'JPN';
Copy The Code & Try With Live Editor
Advertisements

Demonstration


Previous
[Solved] Average Population in SQL solution in Hackerrank
Next
[Solved] Population Density Difference in SQL solution in Hackerrank