Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 53d1d1b

Browse files
Create African Cities.md
1 parent de44d1d commit 53d1d1b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

‎SQL/African Cities.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# `African Cities`
2+
3+
https://www.hackerrank.com/challenges/african-cities/problem?isFullScreen=true
4+
5+
<br>
6+
7+
>Given the CITY and COUNTRY tables, query the names of all cities where the CONTINENT is 'Africa'.
8+
>
9+
>Note: CITY.CountryCode and COUNTRY.Code are matching key columns.
10+
11+
<br>
12+
13+
## `Input Format`
14+
15+
The CITY and COUNTRY tables are described as follows:
16+
17+
![image](https://github.com/imvickykumar999/hackerrank-codechef-leetcode/assets/50515418/b22993f8-7bc8-41ca-acd6-cef7976e5b8e)
18+
19+
![image](https://github.com/imvickykumar999/hackerrank-codechef-leetcode/assets/50515418/4a447e4a-789e-4f82-a2d7-852ecc4db695)
20+
21+
<br>
22+
23+
# `Solution`
24+
25+
```sql
26+
select ct.name from city as ct inner join country as co on ct.CountryCode = co.Code where co.continent = 'Africa';
27+
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /