Write a SQL query which should fetch the 5th maximum salary
of an employee from the table?
Answer Posted / vsandhyana
Hi Hashmatulla Baig,
I think your query will not give the desired output. it
should be modify please refer below for the same.
SELECT empno, sal
FROM
(
select empno, sal, (ROW_number() OVER (order by sal desc)) R
from emp
order by sal desc
)
WHERE R = 5;
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Can you define a query subject?
--------------Explain Table of contents?
How can I test reports in cagonos?
Define query studio?
What is a Datastore in Cognos?
What are various types of gateways in cognos?
what is catalog and types of catalogs in cagnos and which is better?
Can you define confirmed dimension?
Hi experts,Recently I faced one questions in MNC,They having 4 tables in FM ..One fact table CALLING X, Remaining 3 tables are there not fact calling y,z etc...We want to join individually from X to Y..please suggest.
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 are the advantages of using cognos sql?
what is the use of backward drilling in cognos 8?is it possible?whats the uws of it?
Can anyone give me the url for cognos forum which is similar to forumtopics.com/busobj for business objects?
What are query items?
What are the advantages of cognos?