name(国家)    region(地区)   area(面积)        population(人口) 
Afghanistan  Asia           652225           26000000  
Albania      Europe         28728            3200000 
Algeria      Middle East    2400000          32900000 
Andorra      Europe         468              64000  
Angola       Africa         1250000          14500000 
Argentina    South America  2800000          39300000 
Armenia      Europe 29743   3000000          3360000000 
Australia    Australasia    7700000          20300000  
Austria      Europe         83871            8100000 
Azerbaijan   Europe         86600            8500000  
Bahamas      Americas       13939            321000 
Bahrain      Middle East    717              754000 
Bangladesh   Asia           143998           152600000 
Barbados     Americas       430              272000 
Belarus      Europe         207595           9800000 
Belgium      Europe         30528            10300000 
Belize       Americas       22965            266000  
Benin        Africa         112622           7100000 
Bhutan       Asia           38364            2400000 
Bolivia      Americas       1100000          9100000  
 有些国家的人口数比她的周边国家(周边国家指在同一地区的国家)要多三倍,列出这些国家和地区.

解决方案 »

  1.   

    select a.* from tb a left join(select 地区,min( 人口)as 人口 from tb group by 地区)b
    on a.地区=b.地区 where a.人口>b.人口*3
      

  2.   

    BTW:给便哥点意见:
    1.多3倍也就是至少是4倍才行,
    2.最好转换成bigint,以免溢出。
      

  3.   

    着么快啊!!谢谢各位
    原题目就是这样 我也感觉有点没说清楚
    这个也就是个练习题 那就按只要比同一地区(region)最少人口的那个国家多3倍全都查询来处理
    不好意思 表达能力不强!不知道大大门看懂了没
      

  4.   

    select * from tb
    where exists(select 1 from tb t where 地区=tb.地区 and 人口<tb.人口/4)