SQL/MySQL

[MySQL/HackerRank] African Cities

NLP Developer 2023. 8. 21. 01:42
728x90
반응형

https://www.hackerrank.com/challenges/african-cities/problem?isFullScreen=true 

 

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: 

Code

SELECT CITY.NAME 
FROM CITY
JOIN COUNTRY ON CITY.COUNTRYCODE = COUNTRY.CODE
WHERE COUNTRY.CONTINENT = 'AFRICA'
728x90
반응형