Data Modeling – Moving or Rolling Aggregates in SQL
looker.com