Archives of the TeradataForum
Message Posted: Tue, 07 Jun 2005 @ 21:37:58 GMT
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
|