Im between cherry

Hackerrank | MySQL | African Cities 본문

데이터분석/practice_query

Hackerrank | MySQL | African Cities

meal 2020. 8. 29. 15:45

African Cities

Problem

 

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.

 

 

SELECT City.Name
FROM City
LEFT JOIN Country ON City.Countrycode = Country.Code
WHERE Country.Continent = 'Africa'
Comments