Hackerrank-African Cities
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
Get MaheswaraReddy’s stories in your inbox
Join Medium for free to get updates from this writer.
The CITY and COUNTRY tables are described as follows:
Solution
SELECT CI.NAME
FROM CITY AS CI
JOIN COUNTRY AS CO ON CI.COUNTRYCODE = CO.CODE
WHERE CO.CONTINENT = ‘Africa’
Thank you for reading.










