Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 20 Aug 2004 @ 12:34:56 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Alternative for Rank function
 
From:   R.Lakshman

Hi,

My requirement is to get the 5th maximum value of column salary_amount from the table employee. i m able to get the result using rank function.

     select salary_amount,rank(salary_amount) from customer_service.employee

     qualify rank(salary_amount) = 5

By using the above query i am able to get the 5th maximum value from the table employee.

How can i get the same result without using rank function.

I tried with derived tables and subqueries and i m not able to get the desired result.Let me know how to get the solution.


Thanks & Regards,

Lakshman



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016