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 many queries can mysql handle?
How to find second highest salary from a table?
What is query log in mysql?
How is mysql database stored?
How do I restore a mysql database?
What is mysql url?
write a query to mysql in safe mode and to change the root password
What is mysql_pconnect?
What you can use regular expression for in mysql? Support your answer with an example?
Write a command to view mysql database table structure?
Is there a free version of mysql?
How do you create a new database in mysql?
What is trigger in mysql with example?
Is pdo faster than mysqli?
can you tell the order of sql select statement? : Mysql dba