여니의 프로그래밍 study/Oracle

[Oracle] Basic Join : African Cities

여니's 2023. 6. 2. 21:41

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

 

 


문제

-> City 테이블과 Country 테이블에서 Continent가 Africa인 모든 도시의 이름을 출력하라.

 

  select A.name
    from city A 
  inner join country B on A.countrycode = B.code
    where B.continent = 'Africa';