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
What is the query to display top 20 rows?
What is the difference between primary key and candidate key?
How to get nth highest salary from table in a mysql?
How many rows can a mysql table hold?
Write a query to create a database and a table?
Is mysql a good database?
How can you handle the –secure-file-priv in mysql?
What language does mysql use?
Can a table have multiple primary keys?
How do I stop a query in mysql workbench?
Is mysql good for large database?
What do ddl, dml, and dcl stand for?
Is mysql easy to learn?
What does schema mean?
Is mongodb faster than mysql?