
Write a PostgreSQL query to return the top 3 customers by transaction volume in each region. Rank customers by total transaction count, break ties by higher total transaction amount, and then by lower customer_id.
Return `region_name`, `customer_id`, `customer_name`, `transaction_count`, `total_amount`, and `region_rank`.Only include rows where the customer ranks in the top 3 for that region.Ignore transactions with a NULL `customer_id`.