Your question is SQL CodeSignal Task. Start with the requirements and the three 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.
Databricks wants to identify workspaces with the strongest recent engagement. Write a SQL query to return each workspace that has at least 3 active users in the last 30 days, along with the number of active users and total jobs run in that period.
CURRENT_DATE as the reference date for the 30-day window.| Column | Type | Description |
|---|---|---|
| workspace_idPK | INT | Primary key for the workspace |
| workspace_name | VARCHAR(255) | Databricks workspace name |
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Primary key for the user |
| workspace_id | INT | Workspace the user belongs to |
| user_name | VARCHAR(255) | User display name |
| Column | Type | Description |
|---|---|---|
| run_idPK | INT | Primary key for the job run |
| user_id | INT | User who triggered the run |
| run_date | DATE | Date the run started |
| status | VARCHAR(50) | Run status, such as SUCCESS or FAILED |