Leetcode PHP题解--D6 595. Big Countries


595. Big Countries

题目链接

595. Big Countries

题目分析

这道题是个SQL题。

要求返回国土面积大于300万平方公里或者人口多于2500万人的国家的名称、人口、面积。

思路

国土面积大于300万平方公里:area>3000000

人口多于2500万人:population>25000000

返回名称、人口、面积:select name, population, area

最终代码

# Write your MySQL query statement below
select name, population,area from world
where area>3000000 or population>25000000;

若觉得本文章对你有用,欢迎用爱发电资助。


点赞 取消点赞 收藏 取消收藏

<< 上一篇: Leetcode之PHP版题目解析(101. Symmetric Tree)

>> 下一篇: Leetcode之PHP版题目解析(202. Happy Number)