JPMorganChase wants to monitor customer journeys across its mobile app, website, branches, and contact center. Write a PostgreSQL query that aggregates January 2025 interactions for active customers and identifies journey stages with meaningful friction.
An interaction is considered a failure when its status is anything other than success. A friction point must have at least two interactions and a failure rate of at least 40%.
Requirements
- Join customers, interactions, and journey stages.
- Aggregate total interactions, distinct customers, failed interactions, failure rate, and average duration by channel and journey stage.
- Return only qualifying friction points, ranked by failure rate within each journey stage.
- Sort the final output by failure rate descending, stage order, and channel.