File tree 1 file changed +0
-25
lines changed
1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 1
- -- 595. Big Countries
2
- -- There is a table World
3
- --
4
- -- +-----------------+------------+------------+--------------+---------------+
5
- -- | name | continent | area | population | gdp |
6
- -- +-----------------+------------+------------+--------------+---------------+
7
- -- | Afghanistan | Asia | 652230 | 25500100 | 20343000 |
8
- -- | Albania | Europe | 28748 | 2831741 | 12960000 |
9
- -- | Algeria | Africa | 2381741 | 37100000 | 188681000 |
10
- -- | Andorra | Europe | 468 | 78115 | 3712000 |
11
- -- | Angola | Africa | 1246700 | 20609294 | 100990000 |
12
- -- +-----------------+------------+------------+--------------+---------------+
13
- -- A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million.
14
- --
15
- -- Write a SQL solution to output big countries' name, population and area.
16
- --
17
- -- For example, according to the above table, we should output:
18
- --
19
- -- +--------------+-------------+--------------+
20
- -- | name | population | area |
21
- -- +--------------+-------------+--------------+
22
- -- | Afghanistan | 25500100 | 652230 |
23
- -- | Algeria | 37100000 | 2381741 |
24
- -- +--------------+-------------+--------------+
25
-
26
1
select name, population, area from World where area > 3000000 or population > 25000000 ;
You can’t perform that action at this time.
0 commit comments