I am trying to display the maximum average salary; however, I can\'t seem to get it to work.
I can get a list of the average salaries to display with:
select * from (select avg(sal) over (partition by deptno ) avrg,deptno from emp order by avrg desc) where rownum<2;
Try the above one.