cs

https://www.hackerrank.com/challenges/african-cities/problem?isFullScreen=true&h_r=next-challenge&h_v=zen 

 

African Cities | HackerRank

Query the names of all cities on the continent 'Africa'.

www.hackerrank.com

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:

 

[My Answer]

SELECT A.NAME
FROM CITY A
INNER JOIN
COUNTRY B
ON A.COUNTRYCODE = B.CODE
WHERE B.CONTINENT = 'Africa'

 

+ Recent posts