本帖最后由 thn255136 于 2013-03-11 10:58:27 编辑

解决方案 »

  1.   

    select avg()
    from 
    (
    select max(col) ma,min(col) mi from tt
    ) a
    ,tt
    where t.col <> a.ma
    and t.col <>a.mi
      

  2.   

     with A as ( select 10 as times from dual 
                 union all 
                 select 11 as times from dual   
                 union all 
                 select 12 as times from dual
                 union all 
                 select 10 as times from dual 
                 union all 
                 select 11 as times from dual   
                 union all 
                 select 13 as times from dual) 
                 select avg(times) from a where times not in (
            select min(times)  from a 
            union all 
            select max(times) from a  )
            
      

  3.   

    select avg(a) from{select max(a)ama,min(a)ami from t}t1,t
    where t.a<ama and t.a>ami;
      

  4.   

    select (sum(column)-max(column)-min(column))/(count(column)-2) f from s_biz_activity 
    这样试试
      

  5.   

    select avg(x) from t,(select max(x) mx,min(x) mn) t1 where t.x>t1.mn and x<t1.mx