Questions based on the Plaid API documentation.
Using the provided Plaid Item and transaction data, write a PostgreSQL query that summarizes completed transaction activity during January 2025 for every active Item.
item_id, institution_name, transaction_count, total_amount, and activity_status.No activity.total_amount descending, then item_id ascending.| Column | Type | Description |
|---|---|---|
| item_idPK | VARCHAR(32) | Plaid Item identifier |
| institution_name | VARCHAR(100) | Financial institution name |
| status | VARCHAR(20) | Current Item status |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | VARCHAR(32) | Plaid transaction identifier |
| item_id | VARCHAR(32) | Identifier of the related Plaid Item |
| account_id | VARCHAR(32) | Plaid account identifier |
| transaction_date | DATE | Date of the transaction |
| amount | NUMERIC(12,2) | Transaction amount |
| pending | BOOLEAN | Whether the transaction is pending |
| transaction_name | VARCHAR(150) | Display name for the transaction |