Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> query problem
HI,
Friends I need output as follows,
DEPTNO MAX_SAL MAX_NAME MIN_SAL MIN_NAME -------- ---------- ---------- ---------- ----------
10 5000 KING 2600 MILLER 20 3000 FORD 1100 ADAMS 30 2850 BLAKE 950 JAMES select deptno, max_sal,
(select ename from emp where sal = max_sal and rownum = 1 )
max_ename, min_sal,
(select ename from emp where sal = min_sal and rownum = 1 )
min_ename from ( select deptno, min(sal) min_sal, max(sal) max_sal from emp group by deptno )
but my quey is giving the following problem.....
select deptno, min(sal) min_sal, max(sal) max_sal
*ERROR at line 9:
Kindly solve the problem......
ThankS in Advance.... Srinivas
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Sep 28 2004 - 04:38:58 CDT
![]() |
![]() |