题目地址:https://leetcode.com/problems/big-countries/
题解:直接查找,很简单。
select name,population,area
from World
where area>3000000 or population>25000000;
注意
count里需要加上distinct,我一开始想的是应该没有重复的,但是提交失败了,发现表中有重复元祖,如果数据库表建立的时候没强制要求,是可以重复。
题目地址:https://leetcode.com/problems/big-countries/
题解:直接查找,很简单。
select name,population,area
from World
where area>3000000 or population>25000000;
注意
count里需要加上distinct,我一开始想的是应该没有重复的,但是提交失败了,发现表中有重复元祖,如果数据库表建立的时候没强制要求,是可以重复。