I have a data set that has a row for each customer each day with their rolling 30 day average user engagement score. So columns would look something like customer_id, customer_name, engagement_score, date. In a separate table I have customer churn data, with columns along the lines of customer_id, customer_name, churn_date. Does anyone know how I would join these two data sets to create a table that has a row for each customer, their churn date and columns with engagement scores for each of the 12 months preceding their churn date?