Write a query to calculate the month-over-month retention rate of users who linked their bank accounts in their first week at Truebill.
Use the users and bank_account_links tables. Treat the first week as the seven-day period beginning at signup, and measure retention by the number of months since each user's first qualifying link.
month_number, active_users, prior_month_users, and retention_rate.NULL for its retention rate, and sort by month_number ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique Truebill user identifier |
| signup_at | TIMESTAMP | Timestamp when the user signed up |
| Column | Type | Description |
|---|---|---|
| link_idPK | INT | Unique bank account link event identifier |
| user_id | INT | User associated with the link event |
| linked_at | TIMESTAMP | Timestamp when the bank account was linked |