Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple SQL question...
This is what you want :
select deptno, sum(sal)
from emp
group by deptno
having sum(sal) = (select max(sum(sal)) from emp group by deptno);
Received on Fri May 07 1999 - 06:28:17 CDT
![]() |
![]() |