I want to understand the relationship between a record being created in the users table and a user’s first purchase in the subscriptions table. Both tables have created_at as a field, and users.id=subscriptions.user_id.
I’d like output that groups a count of users and the amount of time (in days) between the day that they joined and the day they made their first purchase.
days, users
0, 45
1, 63
2, 14
3, 7
1 Answer