Write a query to find the running total of investment inflows for a specific Morningstar portfolio over time.
Use the supplied portfolio and inflow records. Treat a NULL inflow amount as zero and include only portfolio MG-GA.
portfolio_name, inflow_date, daily_inflow, and running_total.inflow_date ascending.| Column | Type | Description |
|---|---|---|
| portfolio_idPK | INT | Unique portfolio identifier |
| portfolio_code | VARCHAR(20) | Portfolio business code |
| portfolio_name | VARCHAR(150) | Display name of the portfolio |
| portfolio_status | VARCHAR(20) | Current portfolio status |
| Column | Type | Description |
|---|---|---|
| inflow_idPK | INT | Unique inflow record identifier |
| portfolio_id | INT | Portfolio receiving the inflow |
| inflow_date | DATE | Date the inflow was recorded |
| inflow_amount | NUMERIC(14,2) | Investment inflow amount in USD |
| source | VARCHAR(40) | Origin of the inflow |