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 / 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 |
What is a Synonym ?
What is Data Block ?
What is transport network substrate (tns) in oracle?
How to calculate date and time differences in oracle?
What is an Index ?
Define 'view' advantage ?
What is the difference between Sleep and Wait? (Java)
How can you use check constraints for self referential integrity?
What is the usage of control file in oracle?
What is meant by joins? List out the types of joins.
What is the difference between postgresql and oracle?
What is catalog in Oracle?