When working with data, one of the most common tasks involves performing calculations across groups or windows of records. Whether…