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 ways we can retrieve the date in result set of mysql using php?
Tell us something about heap tables?
Is mysql a scripting language?
What are stored procedures and functions?
What does mysql flush hosts do?
What is mysql command line?
Can u give the example by taking an unnormalized table and make that 1nf and then 25nf, and then 3 nf?
What does mysqli stand for?
What is a crosstab query?
Can mysql store files?
What are features of mysql?
Write a command to list all databases in mysql?
What are the differences between a primary key and foreign key?
What is mysql57?
What are views in mysql?