Answer Posted / saraswathi muthuraman
The previous post is to find the 3rd highest value.
Please find the below qry to find the top 3 highest salary
SQL> select a.EMP_NO,a.SAL,a.DEP_NO from emp_test a, (select
SAL,rank() over(order by sal desc) as rank_val from emp_test
group by sal)b where
2 a.sal=b.sal and b.rank_val <=3;
1003 20010 11
1001 10000 11
1001 10000 11
1002 100 11
4 rows selected.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How to return query output in xml format?
How do I select a table in mysql?
What is datadir?
How do I optimize a selected query in mysql?
How do I start mysql in ubuntu?
all the queries used in sql
How much does mysql enterprise cost?
How do I change the max connection in mysql?
What is schema in mysql?
What is definer in mysql trigger?
Does mysql support sequence?
What is sql in mysql?
How to Set a root password if there is on root password.
What is index length in mysql?
What is the difference between a heap table and temporary table?