Write a query to find the top three PayPal transaction categories by volume for a given merchant over the last quarter.
Use merchant 101 and the quarter from 2025-04-01 through 2025-06-30. Transactions with a NULL category or NULL timestamp are ignored.
category_name and transaction_count.| Column | Type | Description |
|---|---|---|
| merchant_idPK | INT | Unique PayPal merchant identifier |
| merchant_name | VARCHAR(100) | Merchant display name |
| merchant_status | VARCHAR(20) | Merchant account status |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| merchant_id | INT | Merchant associated with the transaction |
| category_id | INT | Transaction category identifier |
| occurred_at | TIMESTAMPTZ | Timestamp when the transaction occurred |
| transaction_status | VARCHAR(20) | Transaction processing status |
| Column | Type | Description |
|---|---|---|
| category_idPK | INT | Unique transaction category identifier |
| category_name | VARCHAR(60) | Transaction category name |