Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 07 Jun 2005 @ 21:37:58 GMT


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


Subj:   Re: Sampling
 
From:   Michael Larkins

Hi Michael:

You present an interesting challenge how about using something like this:

     sel *from mkting.CIM7403_Customer_Base
     qualify count(*) over (partition by customer_no rows unbounded preceding) < 6;

Since the count(*) does not specify an ORDER BY there is no sort. The PARTITION BY breaks it up like the original GROUP BY in CSUM, but CSUM and the others required a sort. Now with this being said, it assumes that you are on V2R5.


Hope this helps.

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: 15 Jun 2023