Business Context
Yes Bank's Business Analytics team needs a January 2025 view of customer account activity from its core banking transaction data.
Task
Write a PostgreSQL query using joins to return one row per Yes Bank customer and active account, including customers who have no active account or no qualifying transaction.
Requirements
- Join customers to active accounts and January 2025 successful transactions.
- Calculate successful transaction count and total credited amount per customer-account combination.
- Use
COALESCE so accounts without qualifying transactions show zero total credit.
- Classify accounts with at least
100000 in successful credits as Priority, and all others as Standard.