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 r the names of the reports that you prepared?
Can you explain the advantage of using shortcuts?
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.
What is difference between informatica power mart and power center?
What are the components of the report studio?
What is the use of Cognos scenario?
How can we Maintain the Cube Security by Category level and Dimension level ?
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.
what is the difference between filter and condition?
What is called Cognos powerplay?
What are query items?
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...
Define query items?
in u r data u having duplicates how to fetch the latest data in our report?
Give the advantages of cognos?