解决方案 »

  1.   

    select a.[平均身高]-b.[广州平均] from (select  avg(sHeight) as 平均身高 from student) a,(select avg(sHeight) as 广州平均 from student where charindex('广州',sNative)>0) b
      

  2.   


    select 
    (select  avg(sHeight) as 平均身高 from student)-
    (select avg(sHeight) as 广州平均 from student where charindex('广州',sNative)>0)
      

  3.   

    select sum(平均身高) 差值
    from (
    select  avg(sHeight) as 平均身高
     from student
    union all
     select -1*avg(sHeight) 
     from student where charindex('广州',sNative)>0)a