Using SQL window functions, identify the first and last interaction dates for users within a specific cohort.
Use cohort 2025-Q1. Include every user in that cohort, including users with no dated interactions. Ignore interactions whose date is NULL.
user_id, first_interaction_date, and last_interaction_date.user_id ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| cohort_name | VARCHAR(20) | Cohort assigned to the user |
| Column | Type | Description |
|---|---|---|
| interaction_idPK | INT | Unique interaction identifier |
| user_id | INT | User associated with the interaction |
| interaction_date | DATE | Calendar date of the interaction |
| interaction_type | VARCHAR(30) | Type of interaction recorded |