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 |
how to produce numbers from 1 to 10 using dual table
Is oracle a language?
What is the use of aggregate functions in oracle?
Difference between NO DATA FOUND and %NOTFOUND?
How to call a sub procedure?
What is a connect identifier?
Explain database link?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
how to clone 9i Database on to 10g Database.
what is normalisation?what are its uses?
What are the oracle differences between nvl and coalesce
why you need store procedure ? where do we use it in a Java project? can you get the code for as store procedure using in Java?