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


Please Help Members By Posting Answers For Below Questions

Can you define folder?

738


What are the types of studio present in Cognos?

791


How Metrics Studio is better than Report Studio?

2245


Define query items?

778


What is a Query Subject?

863


how can we Upgrad the reports from version Impromptu 6.0 to 7.0 and Power Play from version 6.6 to 7.0 ?

2045


Can you define a catalog and types of catalogs in cognos?

775


What is a Cube?

883


Re: hi,dis is Hari.I'm searhing on cognos.1 want realtime scenarios with solutions.persons having hands on experience in real time plz help me out. my mail-id is shankerhari17@yahoo.com, hope u will respond as soon as possible. thank u in advance

1865


What are query items?

794


What is the diff between cognos 8.1 & cognos 8.2 & cognos 8.3? Measn whet are the enhancements are added in new versions(8.2& 8.3)?

4124


Looking for IBM COGNOS Certification C1000-065 , C2020-605 , C2090-621 , C2090-623 Dumps?

829


What is the advantage of using shortcuts?

835


i was asked what are the caluclations done by you in your report? plz give reply

1924


Why is auto-regression used in forecasting used on cognos platform?

728