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 |
Whether any commands are used for months calculation? If so, what are they?
What is an Index ?
How to return top 5 rows in oracle?
what is foreign key?
 What are the oracle DML commands possible through an update strategy?
what r tyhe major differences between oracle 9i & 10g?
What are the extensions used by oracle reports?
What would you do if a database crashes in production?
What is snapshot is too old? Give and example for better understand.
What will be the syntax to find current date and time in format "yyyy-mm-dd"?
What is Normalization ?
55 Answers ACS, Genpact, Graphix Solution, IBM, Keane India Ltd, TCS, Vault,
What is a synonym? What are its various types?