[SQL] HackerRank-Join 문제 풀이

한예은·2025년 3월 9일
0

코딩 테스트

목록 보기
8/49

후기

2주 내내 나를 괴롭혔던 조인 문제들.
이론을 아는 것과 실기로 하는 건 확실히 다르지만, 그래도 이론을 알면 어느 정도 풀리는 건 확실하다.
이 문제를 풀면서 느꼈다!

African Cities

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

풀이

SELECT CITY.NAME
FROM CITY
JOIN COUNTRY
ON CITY.COUNTRYCODE = COUNTRY.CODE
WHERE COUNTRY.CONTINENT = 'Africa';
profile
긴 여정의 첫 걸음

0개의 댓글