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

What r the names of the reports that you prepared?

982


Can you explain the advantage of using shortcuts?

1030


What is the difference between Section and Section using Master/Detail in Cognos 8 Report Studio? I tried these both options many times on lists and crosstabs, but dint find any difference. So please give the answer in detail with example.

4587


What is difference between informatica power mart and power center?

1007


What are the components of the report studio?

1182


What is the use of Cognos scenario?

1194


How can we Maintain the Cube Security by Category level and Dimension level ?

2361


what are all the versions of cognos and cognos8 as well as mention all the advantages nd disadvantages in cognos8 versions. any one plz answer this question.

2509


what is the difference between filter and condition?

1069


What is called Cognos powerplay?

1084


What are query items?

1027


my table having data like this year month revenue 2011 jan 100 2011 feb 200 2011 mar 150 like this i want My report 2011 jan 100 2011 feb 100+200=300 2011 mar 300+150=450 like this for this where we specify the condition how will specify? pls ans me pls...

4223


Define query items?

1022


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

5748


Give the advantages of cognos?

1037