{ "data": { "question": { "questionId": "595", "questionFrontendId": "595", "categoryTitle": "Database", "boundTopicId": 1141, "title": "Big Countries", "titleSlug": "big-countries", "content": "
Table: World
\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| name | varchar |\n| continent | varchar |\n| area | int |\n| population | int |\n| gdp | bigint |\n+-------------+---------+\nname is the primary key (column with unique values) for this table.\nEach 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.\n\n\n
\n\n
A country is big if:
\n\n3000000 km2
), or25000000
).Write a solution to find the name, population, and area of the big countries.
\n\nReturn the result table in any order.
\n\nThe result format is in the following example.
\n\n\n
Example 1:
\n\n\nInput: \nWorld table:\n+-------------+-----------+---------+------------+--------------+\n| name | continent | area | population | gdp |\n+-------------+-----------+---------+------------+--------------+\n| Afghanistan | Asia | 652230 | 25500100 | 20343000000 |\n| Albania | Europe | 28748 | 2831741 | 12960000000 |\n| Algeria | Africa | 2381741 | 37100000 | 188681000000 |\n| Andorra | Europe | 468 | 78115 | 3712000000 |\n| Angola | Africa | 1246700 | 20609294 | 100990000000 |\n+-------------+-----------+---------+------------+--------------+\nOutput: \n+-------------+------------+---------+\n| name | population | area |\n+-------------+------------+---------+\n| Afghanistan | 25500100 | 652230 |\n| Algeria | 37100000 | 2381741 |\n+-------------+------------+---------+\n\n", "translatedTitle": "大的国家", "translatedContent": "
World
表:
\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| name | varchar |\n| continent | varchar |\n| area | int |\n| population | int |\n| gdp | bigint |\n+-------------+---------+\nname
是该表的主键(具有唯一值的列)。\n这张表的每一行提供:国家名称、所属大陆、面积、人口和 GDP 值。\n
\n\n\n\n
如果一个国家满足下述两个条件之一,则认为该国是 大国 :
\n\n3000000 km2
),或者25000000
)编写解决方案找出 大国 的国家名称、人口和面积。
\n\n按 任意顺序 返回结果表。
\n\n返回结果格式如下例所示。
\n\n\n\n
示例:
\n\n\n输入:\nWorld 表:\n+-------------+-----------+---------+------------+--------------+\n| name | continent | area | population | gdp |\n+-------------+-----------+---------+------------+--------------+\n| Afghanistan | Asia | 652230 | 25500100 | 20343000000 |\n| Albania | Europe | 28748 | 2831741 | 12960000000 |\n| Algeria | Africa | 2381741 | 37100000 | 188681000000 |\n| Andorra | Europe | 468 | 78115 | 3712000000 |\n| Angola | Africa | 1246700 | 20609294 | 100990000000 |\n+-------------+-----------+---------+------------+--------------+\n输出:\n+-------------+------------+---------+\n| name | population | area |\n+-------------+------------+---------+\n| Afghanistan | 25500100 | 652230 |\n| Algeria | 37100000 | 2381741 |\n+-------------+------------+---------+\n\n
\\u7248\\u672c\\uff1a mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\" Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\" Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\" PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\": {\"World\": [\"name\", \"continent\",\t\"area\",\t\"population\", \"gdp\"]}, \"rows\": {\"World\": [[\"Afghanistan\", \"Asia\", 652230, 25500100, 20343000000], [\"Albania\", \"Europe\", 28748, 2831741, 12960000000], [\"Algeria\", \"Africa\", 2381741, 37100000, 188681000000], [\"Andorra\", \"Europe\", 468, 78115,\t3712000000], [\"Angola\", \"Africa\", 1246700, 20609294, 100990000000]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"