Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Tue, 11 Jan 2005 @ 20:42:50 GMT





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




Subj:   Re: Ranking in Queryman
 
From:   Mike Felts



  I want to get the top N for a range of data where the combination could yield 80,000 rows split across 120 locations  



RANK   () OVER ([PARTITION BY column(s)] ORDER BY column(s) [ASC | DESC])

This will do exactly what you are looking for I believe. It resets the rank back to 1 any time the column(s) in the PARTITION BY portion changes.





     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008