Skip to content

Practice Big Countries

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#595
LeetCode Problem

Big Countries

Problem Statement

Tables: World(name VARCHAR, continent VARCHAR, area INT, population INT, gdp BIGINT). World.name is unique. Return name, population and area for countries whose area is at least 3,000,000 square kilometres or whose population is at least 25,000,000. Either condition is sufficient. Output order is unrestricted.

Source: Big Countries on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
World table: +-------------+-----------+---------+------------+--------------+ | name        | continent | area    | population | gdp          | +-------------+-----------+---------+------------+--------------+ | Afghanistan | Asia      | 652230  | 25500100   | 20343000000  | | Albania     | Europe    | 28748   | 2831741    | 12960000000  | | Algeria     | Africa    | 2381741 | 37100000   | 188681000000 | | Andorra     | Europe    | 468     | 78115      | 3712000000   | | Angola      | Africa    | 1246700 | 20609294   | 100990000000 | +-------------+-----------+---------+------------+--------------+
Output
+-------------+------------+---------+ | name        | population | area    | +-------------+------------+---------+ | Afghanistan | 25500100   | 652230  | | Algeria     | 37100000   | 2381741 | +-------------+------------+---------+

Related LeetCode Problems

Practice more problems similar to Big Countries.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.