select a1,a2,max(b3) from a,b
 where a1 = b2
 group by a1,a2

解决方案 »

  1.   

    select a.a1,a.a2,b.b3 from a,b 
      where a.a1 = (select b.b2 from b 
    where b.rowid != (select max(rowid) from  b where b.b2=a.a1));
      

  2.   

    select a.a1,a.a2,b.b3 from a,
    (select * from b where b1 in (select min(b1) from b group by b2 ))b
    where a.a1=b.b2;
      

  3.   

    可以这样写:select * 
    from (select a.a1, a.a2, b.3 from a, b where a.a1 = b.b2) c 
    where c.rownum = 1;