表名 国名 地区 面积 人口 GDP
bbc( name, region, area, population, gdp)
问题:
有些国家的人口数比她的周边国家(周边国家指在同一地区的国家)要多三倍,列出这些国家和地区.
我实在是写不出来了!谢谢
bbc( name, region, area, population, gdp)
问题:
有些国家的人口数比她的周边国家(周边国家指在同一地区的国家)要多三倍,列出这些国家和地区.
我实在是写不出来了!谢谢
就是这个上的最后一道题!
from bbc b,bbc c,(select max(population) as max_p,region from bbc group by region) aa
where b.population > 3*c.population
and b.population= aa.max_p
(select max(population) as max_p,region from bbc group by region) b
where a.population > 3*b.max_p and a.region = b.region.
大家可以尝试一下自己的答案!感觉楼上的两位的答案不是很正确!
我不知道是不是那个网站的自己的结果不正确,还是......!
希望能讨论一下!
我这样就直接解决了, 这是一个国家的人口, 大于其他这个区域所有国家人口综合的3倍