i love that error number!!
what is wrong is that you cannot nest aggregate functions like that
i don't do oracle but i think the answer is something like:
Code:
select dept
, sumsal as minsumsal
from (select dept
, sum(sal) as sumsal)
from emp
group
by dept
order
by sum(sal) asc)
where rownum=1