Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Explain overloading. Can functions be overloaded?

933


Explain table?

1057


How does Oracle guarantee data integrity of data changes?

2330


In which language oracle has been developed?

1013


State any two functions of oracle?

980


What are advantages of dateset in datastage?

2197


What are the attributes of the cursor?

930


What is the data type of dual table?

916


Explain a private synonyms?

980


What do the 9i dbms_standard.sql_txt() and dbms_standard.sql_text() procedures do?

4471


How to select an oracle system id (sid)?

1017


Difference between oracle's plus (+) notation and ansi join notation?

1030


Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.

1286


What is Undo Management Advisor in Oracle?

1039


Explain view?

976