I am writing some scripts to calculate mean (avg) stdevs count and percentile_cont for some dataI am partitioning over multiple columns e.g. partition by year,month, day order by valueMy question is am I performing unnecessary overhead as I throw away all but the last (or max) value in each window. (I use cte then select max from cte)That is I only care about the avg of the window in its entirety not specific subwindows.I traditionally used group by.What do you suggestHopefully question is clear.
↧