Answer Posted / saraswathi muthuraman
SQL> desc emp_test;
Name
-----
EMP_NO SAL
DEP_NO
SQL> select * from emp_test;
1001 10000 11
1001 10000 11
1002 100 11
1003 20010 11
1004 99 11
1005 50 11
1006 25 11
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;
1002 100 11
1 row selected.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How to delete a table.
How to use rank function in mysql?
What are programming functions?
What is mysql data directory?
How can I create database in mysql?
What is mvcc in mysql?
What is the role of a limit in a mysql query?
What is triggers?
What is delimiter $$?
Is mysql port 3306 tcp or udp?
How do I quit mysql?
How do I set user privileges in mysql?
Is mysql frontend or backend?
How can an index be declared in mysql?
Write a command to list all databases in mysql?