728x90
❓ Question
https://www.hackerrank.com/challenges/african-cities
African Cities | HackerRank
Query the names of all cities on the continent 'Africa'.
www.hackerrank.com


❗ Answer
SELECT city.name
FROM city
INNER JOIN country
ON city.countrycode = country.code
WHERE country.continent = 'Africa';
📌 Discussion
- join 후 조건에 해당하는 레코드만 추출
'SQL 문제풀이' 카테고리의 다른 글
| [해커랭크 SQL] Aggregation - Revising Aggregations - The Sum Function (0) | 2023.08.23 |
|---|---|
| [해커랭크 SQL] Basic Join - Average Population of Each Continent (0) | 2023.08.23 |
| [해커랭크 SQL] Basic Join - Population Census (0) | 2023.08.22 |
| [해커랭크 SQL] Advanced Select - The PADS (0) | 2023.08.22 |
| [해커랭크 SQL] Advanced Select - Type of Triangle (0) | 2023.08.18 |