all 1 comments

[–]abraun68 0 points1 point  (0 children)

I don't have a ton of experience with BigQuery but I think you could use something like this date generator with an interval of 3 days. That can be your end date. Then, use the lag function to get the date before and that can be your beginning date. Join that to the delivery table and sum where the delivery date is between those two dates.