You are given patient onboarding event data and asked to find the bottleneck in the activation funnel. Write a PostgreSQL query that measures the average time from one completed stage to the next for each stage, then returns the stage with the slowest average progression along with how many patients reached that stage. Treat skipped events as non-completions and ignore them in the timing calculation.
You are given patient onboarding event data and asked to find the bottleneck in the activation funnel. Write a PostgreSQL query that measures the average time from one completed stage to the next for each stage, then returns the stage with the slowest average progression along with how many patients reached that stage. Treat skipped events as non-completions and ignore them in the timing calculation.