I would like to find an efficient way to sum the number of points that a team received in the previous N matches (not including the points in the current match) for every combin