Header Ads Widget

African City | Hackerrank solution

African City | Hackerrank solution:-

Given the CITY and COUNTRY tables, query the names of all cities where the CONTINENT is 'Africa'.

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

Input Format

The CITY and COUNTRY tables are described as follows: 

African City | Hackerrank solution:-

The objective of the code is to write  query that give the names of all cities where the CONTINENT is 'Africa'.

Mysql code:-

select c.name from city c left join country cc on c.countrycode=cc.code
where cc.continent='Africa'

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:-