Find out rolling sum for previous 7 days by using SQL
Anonymous
Use a CTE to filter down to last 7 days then take the running sum using a window function with recent_dat as (select score, event_date from tab where event_date >= today() -7) select event_date, sum(score) over(order by event_date) as running_sum from recent_dat
Check out your Company Bowl for anonymous work chats.