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
What do you mean by drill through report?
hi, this is harish. i had finsihed cognos course recently.can some one help in the area of project explination, interview questions,real time scenarious....this is my maild id nanagupta907@gmail.com
Which lifecycle we will use for reporting?
What is the diff between the following Report output-- HTML O/P, PDF O/P, EXCEL 2000 and EXCEL 2003 of report outputs? Listout main differences?
How to a create header dynamically in a crosstab report in cognos 8.1?
How to create model and how to test model?
What are the different types of important services used in cognos?
How to limit the cut,copy and paste operations for an user in reportlevel? Can anyone please send me the steps as i am new to cognos?
How to Reset Pagenumbers in one report.
What are shortcuts? Where it can be used? What are the advantages?
What you mean by drill across?
how to perform single sign in cognos by using url?
------------------What is Inline Query?
can we insert all types of charts in a list report? what r the realtime prompts?
I have ten columns that needs to be totalled... but some columns are empty...how do i get sum all the columns even if sum are empty? Can i get a total of the rows instead of columns? if yes, what is the function to be used?