Your question is Rolling 30-Day Average Query. 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.
Beyond Finance wants to monitor daily sign-ups for its debt-relief application funnel. Write a PostgreSQL query that calculates the rolling 30-day average of valid user sign-ups for the reporting period from February 1 through February 5, 2024.
| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique user identifier |
| is_test_user | BOOLEAN | Indicates whether the account is for testing |
| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Unique event identifier |
| user_id | INTEGER | User associated with the event |
| event_type | VARCHAR(30) | Type of user funnel event |
| occurred_at | TIMESTAMP | Timestamp when the event occurred |