문제
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.
코드
SELECT City.name
FROM City
INNER JOIN Country ON City.CountryCode = Country.code
WHERE Country.continent = 'Africa'
- City 테이블과 Country 테이블에서 Continent가 Africa인 모든 도시의 이름을 출력하라
출처
반응형
'Algorithm > MySQL' 카테고리의 다른 글
[해커랭크(HackerRank)] Average Population of Each Continent (MySQL) (0) | 2021.07.05 |
---|---|
[해커랭크(HackerRank)] Population Census (MySQL) (0) | 2021.07.05 |
[LeetCode] Duplicate Emails (MySQL) (0) | 2021.07.05 |
[LeetCode] 620. Not Boring Movies (MySQL) (0) | 2021.07.05 |
[LeetCode] 595. Big Countries (MySQL) (0) | 2021.07.05 |