-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path595. Big Countries.sql
More file actions
35 lines (28 loc) · 944 Bytes
/
595. Big Countries.sql
File metadata and controls
35 lines (28 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
Question 595. Big Countries
Link: https://leetcode.com/problems/big-countries/description/
Table: World
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| name | varchar |
| continent | varchar |
| area | int |
| population | int |
| gdp | bigint |
+-------------+---------+
name is the primary key (column with unique values) for this table.
Each row of this table gives information about the name of a country,
the continent to which it belongs, its area, the population, and its GDP value.
A country is big if:
it has an area of at least three million (i.e., 3000000 km2), or
it has a population of at least twenty-five million (i.e., 25000000).
Write a solution to find the name, population, and area of the big countries.
Return the result table in any order.
*/
SELECT
name,
population,
area
FROM World
WHERE population >= 25000000 OR area >= 3000000