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...

i have a table with 3 columns country,empname,salary and i want the query for get the  name of the employees who is getting top 2 nd highest salary for individual country?
Thanks in advance 

Answer Posted / madhu

select * from ( select country,empname,salary, dense_rank() over (partition by country order by salary) rank from emp) where rank <= 2;

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to perform back drill through in cognos 8 what is the use of it

2520


what are the names of the reports that you prepared?

1089


What is a Framework manager?

1030


Define query studio?

983


What is main advantage datawarehousing over oracle?

992


How to generate cubes in cognos?

955


What are the batches and it’s details?

963


--------------Explain Table of contents?

2002


what is catalog and types of catalogs in cagnos and which is better?

1149


Suppose you run a report with empty data, how will you inform the end user that it has no data while running the report in report studio? Is it possible, if so how?

946


Can you explain dynamic query mode?

1040


in u r data u having duplicates how to fetch the latest data in our report?

5707


All ready we have alias tables for modifications why we are using views if anybody this answer plz reply me

2072


Write some methods to apply securities in framework manager model?

1094


What is the complex report you faced in real time?

2164