SQL 문제풀이
[해커랭크 SQL] Basic Join - African Cities
냄비짱
2023. 8. 22. 23:53
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 후 조건에 해당하는 레코드만 추출