Your question is Weekly Active SMBs by Month. Start with the requirements and the one table 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.
Intuit wants a simple monthly view of SMB engagement across product events. Write a SQL query to calculate the average number of active SMBs per active week in each month.
account_type = 'SMB'.event_name is NULL.smb_id values as active SMBs.YYYY-MM and the average rounded to 2 decimal places.| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event row identifier |
| smb_id | INT | SMB account identifier |
| account_type | VARCHAR(20) | Customer segment |
| product_name | VARCHAR(50) | Product where the event occurred |
| event_name | VARCHAR(50) | Tracked user action |
| event_date | DATE | Date the event occurred |