Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 05 Sep 2003 @ 13:35:21 GMT


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


Subj:   Re: Rank top and bottom
 
From:   Anantaraman, Kumaran (K.)

  Are you sure about that? My Explain shows two steps.  



That's right. There are 2 STAT steps, as do these 2 queries too. This makes better sense.

select
  rank(col2 asc)
from
  tablex
qualify (
  rank(col2 desc) < 11
)
;

select
  *
from
  tablex
qualify (
  rank(col2 desc) < 11 or
  rank(col2 asc ) < 11
);

Kumaran Anantaraman



     
  <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: 23 Jun 2019