Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Want to print 4th maximum salary from emp table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
raviprasath_kp
Warnings : 1

New User


Joined: 20 Feb 2005
Posts: 65
Location: chennai

PostPosted: Thu Jun 07, 2007 10:05 pm    Post subject: Want to print 4th maximum salary from emp table
Reply with quote

hi i want to print 4th maximum salary from emp table

any qurey please sugest me
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Jun 07, 2007 11:42 pm    Post subject: Re: 4th max salary
Reply with quote

Wouldn't it be the same technique shown here, with just a difference in the count?

or here in any of these?

http://ibmmainframes.com/viewtopic.php?t=16311
http://ibmmainframes.com/viewtopic.php?t=12789
http://ibmmainframes.com/viewtopic.php?t=7683
http://ibmmainframes.com/viewtopic.php?t=6243
http://ibmmainframes.com/viewtopic.php?t=2931
http://ibmmainframes.com/viewtopic.php?t=2739
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 08, 2007 12:08 am    Post subject:
Reply with quote

Hello,

Quote:
any qurey please sugest me


Sorry to be a grump, but now that you've been here for over 2 years, you would hopefully be familiar with the forum tool that lets you do a search. . . icon_sad.gif
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Fri Jun 08, 2007 11:52 am    Post subject:
Reply with quote

Hope you get the answer from the link http://ibmmainframes.com/viewtopic.php?t=16311 provided by Super K
which is
SELECT MAX(SALARY) FROM EMP_TABLE A WHERE 4=(SELECT COUNT(*) FROM EMP_TABLE B WHERE A.SALARY<=B.SALARY);
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us