Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple SQL Question
Here is the other solution. Column 'sal' must be indexed:
select ename, sal from
( select ename, sal, rownum rr from emp where sal >=
(select min(sal) from emp ) ) ,
( select count(*) cc from emp)
where rr > cc-3
order by sal desc;
/
Elena Received on Wed Apr 22 1998 - 05:04:32 CDT
![]() |
![]() |