JPMorganChase wants to measure early engagement among new checking account holders using Chase digital banking activity. Write a PostgreSQL query that calculates next-calendar-month retention for accounts that received an online deposit within their first seven days.
deposit event through the online channel from the opening timestamp through seven days after opening, inclusive.| Column | Type | Description |
|---|---|---|
| account_idPK | INTEGER | Unique checking account identifier |
| opened_at | TIMESTAMP | Account opening timestamp |
| account_type | VARCHAR(20) | Account product type |
| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Unique event identifier |
| account_id | INTEGER | Associated account identifier |
| event_at | TIMESTAMP | Event timestamp |
| event_type | VARCHAR(30) | Event category |
| channel | VARCHAR(20) | Event channel |