Your question is Cohort Analysis Q1 vs Q2. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
The Starlink customer portal team wants to compare early engagement for users who signed up during Q1 and Q2 of 2025. Write a PostgreSQL query that produces a three-month retention view for each signup cohort.
Q1 or Q2.session_started event during that month.| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique Starlink customer portal user identifier |
| signup_date | DATE | Date the user created an account |
| VARCHAR(255) | User email address |
| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Unique product event identifier |
| user_id | INTEGER | User associated with the event |
| event_timestamp | TIMESTAMP | Timestamp when the event occurred |
| event_type | VARCHAR(50) | Name of the recorded product event |