In the below example, I want to use a single batch but with multiple windows. How do I do this or if that’s possible even with “offset” and “shift” node.
var past = batch
|query(’’‘
SELECT…
’’’)
.groupBy(groups)
.period(w2w_period)
.every(w2w_every)
.offset(w2w_previous)
.align()
|shift(w2w_previous)
|mean(‘sum’)
.as(‘mean’)
var current = batch
|query(’’‘
SELECT …
’’’)
.groupBy(groups)
.period(period)
.every(every)
.align()
|mean(‘sum’)
.as(‘mean’)