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 check server status with 'mysqladmin'?
How to delete a database from mysql server.
What are the 3 main types of search queries?
Is mysqli faster than mysql?
Is mysql running ubuntu?
Write a query to find duplicate rows in table?
How to set the time zone for MySQL to particular country time?
What is the maximum size of mysql database?
how can you test for null values in a database? : Mysql dba
what is the difference between the nvl function, ifnull function, and the isnull function? : Mysql dba
Does mysql case matter?
How do I view mysql logs?
What is mysql in linux?
What is tee command in mysql?
Where is the mysql database stored?