a query to select maxmun 3 salaries of employee table

Answer Posted / ron

if you need to select by department then analytic function
is more readable:
1. use row_number() partition by dept order by sal desc as rn,
2. in where clause choose rn <4;

you can use rank() instead; if 2 or more employees have same
salary.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to use select statement as formal parameter in procedure specification?(someone said that using string) ex:-procedure(a in number,select ename from emp ) i am asking syntax like this?

1534


how do we code triggers , store procedure , Performance tuning and indexing in a Java Project? Pls kindly get me the perfect answer with the code for each....thank you in advance............pls any body kindly help me soon as possible....

1594


How to pass parameters to procedures in oracle?

572


What is the difference between count (*), count (expression), count (distinct expression)?

562


candidate key is subset of super key but not vice-verse explain

1584






State any two functions of oracle?

641


What are the uses of Database Trigger ?

1111


What are the attributes that are found in a cursor?

653


How to assign a table row to a record variable?

584


How to connect to a remote server?

567


What are the varoius components of physical database structure of oracle database?

573


ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process

1753


what is reindexing?

1184


Is there a function to split a string in plsql?

572


Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

1446