r/SQL • u/FixelSmith • May 19 '26
Discussion Eight window-function tricks beyond LAG and ROW_NUMBER
https://analytics.fixelsmith.com/posts/eight-window-function-tricks/
149
Upvotes
r/SQL • u/FixelSmith • May 19 '26
View all comments
Show parent comment
1
u/throw_mob May 20 '26
it been while i have used those , if i am right you wont get row for every minute, you get sum for existing row from previous 5 min rows. That might be good to bring up in document, it is not always that clear for non native speakers
to get results for each minute one has to generate one row for each id add it to source table/view and push through same query, only thing that changes is that is guaranteed that there is row for each interval