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 |
What is an UTL_FILE.What are different procedures and functions associated with it?
Explain oracle instance.
Which Database is the best for the Security issue ? 1. DB2 2.SQL Server 3.MySQL 4.ORACLE
How to export your own schema?
Can cursor variables be stored in PL/SQL tables.If yes how. If not why?
How to delete a user account in oracle?
What is Data Dictionary Cache in Oracle?
What is a cluster?
hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.
How to execute a stored program unit?
Explain the features of oracle?
Can we store pictures in the database and if so, how it can be done?