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

Can I create users through internet explorer in oracle 10g?

1157


What is the difference between alert log file and tarce file ?

2232


Describe varray?

1118


Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.

2207


Using the relations and the rules set out in the notes under each relation, write statements to create the two sequence generators specified in the notes.

2176


Explain a data segment?

1112


Explain the truncate in oracle?

1013


What is the recommended interval at which to run statspack snapshots, and why?

2964


How to convert a string to a date in oracle database?

1101


How will you differentiate between varchar & varchar2?

1086


What is a Garbage Collection? and what is full recursive Garbage collection?

2956


Calculate difference between 2 date / times in oracle sql?

1099


How to calculate date and time differences in oracle?

1099


Explain drop constraint oracle?

1121


ABOUT IDENTITY?

2109