How would you write a SQL query to find all accounts that have processed a corporate action payment of over $100,000 in the last 30 days?
Use the provided PostgreSQL tables and consider only payments marked as processed. The result should summarize qualifying payments at the account level.
account_id, account_name, qualifying_payment_count, and maximum_payment_amount.| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique account identifier |
| account_name | VARCHAR(100) | Account display name |
| account_type | VARCHAR(30) | Account classification |
| Column | Type | Description |
|---|---|---|
| payment_idPK | INT | Unique payment identifier |
| account_id | INT | Account receiving the payment |
| payment_amount | NUMERIC(15,2) | Corporate action payment amount |
| processed_at | TIMESTAMP | Timestamp when the payment was processed |
| status | VARCHAR(20) | Payment processing status |
| corporate_action_type | VARCHAR(30) | Type of corporate action |