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.month, self_service_resolutions, self_service_mom_growth_pct, live_agent_resolutions, live_agent_mom_growth_pct.month as YYYY-MM.2 decimal places.2024-01-01 00:00:00 inclusively through 2024-05-01 00:00:00 exclusively.| 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 |