How do i get the timestamps for a MAX(val) and MINval) in a NAMED WINDOW or WINDOW?
Window:
[
t1- 100
t2- 200
t3- 250
t4- 900
]
every time the window is released I want t1 with its min value and t4 with its max value.
I tried with subquery on my NAMED WINDOW, but it says aggregation in subqueries not allowed. Consider using INSERT INTO instead.
Can someone help me out?
Thanks
You can use maxby(val).timestamp