Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

How to calculate moving sums within variable size windows? - response (4) by dnoeth

$
0
0

The RANGE syntax is Standard SQL but unfortunately it's not implemented in Teradata.
So Vlad's solution is complicated, but probably the only one (if you actually need this for each row in your result set you have to do it in a Derived Table and the join back). There just one possible enhancement, in TD13.10 you might get any missing dates using EXPAND ON instead of a join to sys_calendar 
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>