akmalist / HackerRank

Playground for HackerRank
0 stars 0 forks source link

African Cities query #2

Open akmalist opened 5 years ago

akmalist commented 5 years ago

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 cy.name 
from city as cy
inner join country as ct
on cy.CountryCode = ct.Code 
where ct.continent ='Africa'