Wayfair wants to compare how effectively customers are resolved through self-service experiences and live agent support. Write a PostgreSQL query that reports monthly resolved interactions for both channels and their month-over-month growth.
resolved = TRUE separately for self_service and live_agent.LAG.NULL growth when no prior month exists or the prior count is zero.| Column | Type | Description |
|---|---|---|
| customer_idPK | INTEGER | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| customer_status | VARCHAR(20) | Customer lifecycle status |
| Column | Type | Description |
|---|---|---|
| interaction_idPK | INTEGER | Unique interaction identifier |
| customer_id | INTEGER | Customer associated with the interaction |
| occurred_at | TIMESTAMP | Timestamp when the interaction occurred |
| interaction_type | VARCHAR(20) | Support channel used by the customer |
| resolved | BOOLEAN | Whether the interaction was resolved |