Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple SQL question...
This did the job when I tested it on my temp table
select deptno
from t1
group by deptno
having sum(sal) = (
select max(sum(sal))
from t1
group by deptno)
/
HTH Geoff
notronrj_at_my-dejanews.com wrote:
> Hello,
>
> Got a SQL question. I think it's a simple one, but I am fairly new
> at SQL. I just took the Intro to SQL from Oracle Education.
>
> I have a table "EMP" that contains employess, dept number and salary and
> other info.
>
> I want to write a query that returns the dept with the highest combined
> salary.
>
<snip> Received on Mon May 03 1999 - 20:50:26 CDT