Hackerrank-African Cities
Jan 9, 2023
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:
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.