Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 23 Aug 2004 @ 12:15:53 GMT


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


Subj:   Re: Alternative for Rank function
 
From:   R.Lakshman

Hi Dieter,

I have found the alternative for the rank function.Just i would like to share the information.

     SELECT A.salary_amount FROM employee  A    WHERE 10 = (SELECT DISTINCT
       COUNT(B.salary_amount) FROM employee B WHERE A.salary_amount <= B.salary_amount);

this query gives me the desired result for finding the nth max value or min value in the table.the above query will give me the 10th max value in the table.


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: 15 Jun 2023