Is there a reason why I can't use

select col1, col2, count(distinct col3) over (PARTITION by col4 order by
col5 ROWS BETWEEN 5 PRECEDING AND FOLLOWING) as col1 from table

?

I am trying to see for any given window if there is a lot of variability in
a col4, and it just doesn't work with count distinct, count(1) works find,
but that's not the data I am looking for.

Reply via email to