|
|
Archives of the TeradataForum
Message Posted: Wed, 28 Jul 2004 @ 18:19:39 GMT
Subj: | | Re: How to make use of distinct option with count window function. |
|
From: | | Michael Larkins |
Good place for a derived table:
sel div, cd1, typ , count(id) over (partition by div, typ rows
between unbounded preceding and unbounded following) as lvltyp ,
count(id) over (partition by div, typ , cd1 rows between unbounded
preceding and unbounded following) as lvlcd
from (sel div, cd1, typ ,id from t1 group by 1,2,3,4) dt;
Hope this helps,
Michael Larkins
Certified Teradata Master
| |