↧
Answer by Joe Obbish for Rolling SUM with a 30 day range
I haven't tested this extensively but I think it can do what you need. Here I assume that ID_NO is a customer identifier, TD is the date of the order, and AMT_PUR represents the amount ordered. You...
View ArticleRolling SUM with a 30 day range
I am using SQL Server 2012 and have a db with around 2 million rows. I need to figure out how to calculate a rolling sum over a 30 day range and return any results over a set amount (amt_pur). These...
View Article