select b.class_no, max(amt)
from (
  select class_no, sum(amt) as amt
  from a
  where oper_date = '2002/2/11')

解决方案 »

  1.   

    select a.class_no from a where amt in (select max(amt) from a where
       oper_date='2002-02-11');
      

  2.   

    select b.class_no, max(amt)
    from (
      select class_no, sum(amt) as amt
      from a
      where oper_date = '2002/2/11'
      grup by class_no)
      

  3.   

    select a.class_no,max(amt) from a where oper_date='2002/2/11' group by a.class_no
      

  4.   

    select a.class_no,max(amt) from a 
    where to_char(oper_date,'yyyy/mm/dd')='2002/02/11' 
     group by a.class_no
      

  5.   

    select b.class_no, amt
    from (
      select class_no, sum(amt)  amt
      from a
      where oper_date like '2002-02-11%'
      grup by class_no order by amt desc) where rownum=1;