I\'m trying to write a query to do cohort analysis on some tables in a loop. My problem is that in the subquery of user_activities, I\'m calculating the difference
user_activities