Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Tue, 28 Aug 2007 @ 11:02:54 GMT





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




Subj:   Rank in Teradata
 
From:   A, Krishna



Hi All,

I am using Teradata.

I have a report with two columns - Id and Volume.

Now I want to rank Top 5 Id based on the Volume. I know it is easy to do. But the problem is I want to Rank them before pulling all the data in the report. For instance, if I have 1 million customer Ids in my report, I do not want to fetch all the million customers in the report and then do the ranking...that will cause too much load. Is there any way to fetch data for only the Top 5 customers from the beginning?

The data I have with is shown here for 10 samples.

     ID                    Volume
     500818413               2.42
     131734                  0.04
     503282204               0.04
     500854807               0.03
     700109009               0.21
     700009148               0.02
     500439225               0.31
     500777055               0.01

Thanks,

Krishna

Krishna
Business Analyst
Genpact, Bangalore, India.





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