A Data Scientist wants to incorporate extensive fraud analysis in the transactions that are being fed into a data pipeline. One of the features they want to create is how many transactions a customer is doing over a period of time, going back to the last day, last seven days, and last year.
What is the MOST efficient way to build that feature?