Description

SQL Schema Table: World

Column NameType
namevarchar
continentvarchar
areaint
populationint
gdpint

name is the primary key column 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).

Question

Write an SQL query to report the name, population, and area of the big countries.

Return the result table in any order.

The query result format is in the following example.

Example 1:

Input:

World table

namecontinentareapopulationgdp
AfghanistanAsia6522302550010020343000000
AlbaniaEurope28748283174112960000000
AlgeriaAfrica238174137100000188681000000
AndorraEurope468781153712000000
AngolaAfrica124670020609294100990000000

Output:

namepopulationarea
Afghanistan25500100652230
Algeria371000002381741

Solution

1SELECT name, population, area FROM World WHERE area >= 3000000 OR population >= 25000000;