I'm trying to obtain a rolling average by user. I don't know if is possible but I've being trying for two days already with any luck. Hopefully somebody can help me :)
I want to obtain something like this:
This is my query:
SELECT Date, User, QtyClosedTickets,
AVG(QtyClosedTickets) OVER (PARTITION BY User ORDER BY Date ASC rows between unbounded preceding and current row) AS RollingAvg
FROM Service
What I get is the average by each row instead the sum for previous rows, hope that makes sense.