You are given transaction, decision, and client data from an investment operations workflow. Write a PostgreSQL query that helps you decide whether a process change improved outcomes: for each region, return the number of decisions made, the number of successful outcomes, and the success rate for decisions made in Q2 2024. Only include regions with at least 2 decisions, and sort by success rate descending, then region ascending.
Output details
- Return columns in this order:
region, decisions_made, successful_outcomes, success_rate.
- Filter dates inclusively from
DATE '2024-04-01' through exclusively before DATE '2024-07-01'.
- Round
success_rate to 2 decimal places.
- Treat NULL or non-
success outcomes as unsuccessful.
- Count qualifying rows without deduplication.