알고리즘

[hackerrank, SQL]African Cities

Baro_forest 2023. 2. 8. 13:33

아프리카의 모든 도시 목록

 

 

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: 

 

SELECT
    city.name
FROM
    city
JOIN country ON
    country.code = city.countrycode
AND
    country.continent =  "Africa"
    ;