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
What is user in mysql?
What is ntext?
Explain the difference between primary key and candidate key in mysql?
How to enter numeric values as hex numbers?
How to get a version of mysql?
What is mysql enterprise edition?
What is difference between mysql and mysql workbench?
What causes mysql too many connections?
How do I backup mysql database on linux?
What is the purpose of -> in the mysql terminal?
How to escape special characters in sql statements?
What is row level locking in mysql?
What is mysql ndb?
How to delete a trigger in mysql?
What are date and time functions in mysql?