Write a query to find the daily active users (DAU) who successfully completed at least three automated tasks within a 24-hour window.
Use the users and task_executions tables. Include only successful executions whose task type is automated. Treat a task completed exactly 24 hours earlier as within the window.
activity_date, user_id, and completed_tasks_in_24h.activity_date ascending, then user_id ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| display_name | VARCHAR(100) | User display name |
| Column | Type | Description |
|---|---|---|
| execution_idPK | INT | Unique task execution identifier |
| user_id | INT | User who initiated the execution |
| task_type | VARCHAR(30) | Execution type, such as automated or manual |
| status | VARCHAR(30) | Execution result status |
| completed_at | TIMESTAMP | Timestamp when the execution completed |