How to find 1st, 2nd, 3rd highest using select select
statement not using rownum
Answers were Sorted based on User's Feedback
Answer / madhavi
SELECT sal
FROM (SELECT sal, RANK() OVER(ORDER BY sal DESC) AS rnk
FROM emp)
WHERE rnk IN (1,2,3);
| Is This Answer Correct ? | 14 Yes | 3 No |
Answer / ajit
select distinct *
from (select e.*,dense_rank()over(order by sal desc) rn from emp e)
where rn in (1,2,3);
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / annada
SELECT e.lastname,e.salary FROM employees e
WHERE 1=(SELECT count(*) FROM employess s
WHERE s.salary>e.salary
| Is This Answer Correct ? | 1 Yes | 2 No |
In AP we done Customizations for Late Payments Charges. For Reporting Purpose What are the Documents Prepared for Customer Understanding??
17. Display the order number and average item cost for each order.
What is a nested table and how is it different from a normal table?
What are the values that can be specified for OPTIMIZER MODE Parameter ?
How to create id with auto_increment on oracle?
What are the attributes of the cursor?
How to synchronize 2 schema's objects?
How do I connect to oracle?
Is it possible to split the print reviewer into more than one region ?
Maximum how many triggers can be updated in table ?
5 Answers Accenture, Cap Gemini,
How to get maxsal , minsal, ename department wise in single query
What is oracle host variable?