Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Fri, 03 Oct 2008 @ 12:51:01 GMT


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


Subj:   Re: Ranking function
 
From:   Michael Larkins

Shubhangi:

ORDER BY sorts - that is all

The RANK function sorts too. Than it assigns the number starting with 1 for the lowest of these values. The PARTITION BY causes it to begin again back at 1 when any of those column values changes.

So in this case, the sort re-arranges the data once it is ranked. Looking at the values in the ORDER BY do not make much sense since they are not listed among the ranked values. It would probably make more sense to you if you (read the manual) or took out the ORDER BY.


Regards,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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: 28 Jun 2020