Write a SQL query to find the monthly active users who performed more than three specific transactions in the last quarter.
Use users and transactions. For this exercise, qualifying transactions have a transaction_type of consultation or payment, and the last quarter means the previous completed calendar quarter relative to CURRENT_DATE.
activity_month, user_id, and transaction_count.activity_month and user_id.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| created_at | DATE | Date the user was created |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| user_id | INT | User associated with the transaction |
| transaction_type | VARCHAR(50) | Transaction classification |
| occurred_at | TIMESTAMP | Timestamp when the transaction occurred |