Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 21 Sep 2004 @ 11:12:36 GMT


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


Subj:   Rank() and Partition By with Large Tables
 
From:   Remo Suurkivi

Hi

Does anybody have any experience with RANK functionality and extra large tables. I'm having big time problems with making a simple question to work.

Table A = 1 billion rows

Task: to find top 10 destinations for Field 2. Possible variatoions in 'Field 1' are limited to 1'000 distinct values making resultset of 10'000 rows.

     Select
     Field1,
     Field2,
     Sum(Usage) total,
     Rank() Partition by Field1 Order By Total Desc
     Group By ???

Thx

Remo



     
  <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