要求只能是select语句来查询的,不能用存储过程或其他的什么.
谢谢各位拉!

解决方案 »

  1.   

    1. select region from (
        select region,sum(population) as sp from bbc group by region
        )temp
       where temp.sp=0
    2. 不清楚搂主的意思,周边国家的人口是任一国家还是平均人口?怎么定义?
      

  2.   

    1.select region from (select region as A1,sum(population) as A2 from bbc group by region ) A where A.A2=02.
    select B1 from (select sum(population) as A1,region as A2 from bbc group by region) A,(select name as B1,max(population) as B2 ,region as B3 from bbc) B where A.A2=B.B2 and
    convert(float,B.B2/A.A1)>=0.75
      

  3.   

    谢谢楼上upwind1982() 
    第一个问题的答案是对拉。第二个的意思是一个国家的人口数比它的周边国家的人口数要多3倍,比如中国人口数比日本的人口数目多3倍谢谢楼上的houyichong(喜欢坐在海边静静的看海) 
    你给两条sql语句都存在语法错误!
      

  4.   

    第2个问题可以这样理解吗,只要同一地区的任一国家比该地区人口最少的国家的人口多三倍,都符合条件?如果是,参考下面:
    select b.name name,b.region region from (select region,min(population) mp from bbc group by region) a inner join bbc b on a.region=b.region where b.population>(a.mp*3)
    order by region,name
      

  5.   

    楼主的解释是:
    就是只要同一地区的两个国家,只要其中一个比另外一个的人口多3倍,就可以满足条件拉。那么比如说:A,B在同一地区region1,A的人口比B多3倍,假设region1里的人口最少的国家是C,那么C肯定不会是A,但是有可能是B,对不对?
    A的人口比B多3倍,那么A的人口肯定比C多3倍,或者更多,对不对?
    所以只要A的人口比C多3倍就满足条件,不管她的人口不是是也比B多3倍。楼主以为呢?