Airtel Payments Bank wants a monthly view of its highest-value customers. Write a PostgreSQL query to find the top three customers by total successful transaction amount in each calendar month.
status = 'SUCCESS' and a positive, non-null amount.customers to return the customer's name.YYYY-MM and order the results by month and rank.| Column | Type | Description |
|---|---|---|
| customer_idPK | INTEGER | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's full name |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | BIGINT | Unique transaction identifier |
| customer_id | INTEGER | Customer who initiated the transaction |
| transaction_timestamp | TIMESTAMP | Transaction date and time |
| amount | NUMERIC(12,2) | Transaction amount in Indian rupees |
| status | VARCHAR(20) | Transaction processing status |