Header Ads Widget

Population Census | hackerrank solution

 Population Census | hackerrank solution:-

Given the CITY and COUNTRY tables, query the sum of the populations of all cities where the CONTINENT is 'Asia'.

Note: CITY.CountryCode and COUNTRY.Code are matching key columns.

Input Format

The CITY and COUNTRY tables are described as follows:

Population Census | hackerrank solution:-

The objective of code is query the sum of the populations of all cities where the CONTINENT is 'Asia'.

Mysql code:-

select sum(c.population) from city c inner join country cc on c.countrycode=cc.code
where cc.continent='Asia'


Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-