Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 11 Jan 2005 @ 12:10:16 GMT


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


Subj:   Re: Ranking in Queryman
 
From:   Pritchard, Ian

Try :

     Select
         location
        ,Barcode
        ,SOH
        ,RANK() OVER (PARTITION BY location
                      ORDER BY Barcode, SOH) as 'RankValue
     From
       tablename
     Where soh < 0
     QUALIFY RankValue <=N
     ;


     
  <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