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 Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016