Write a query to calculate the rolling three-month average of capital calls for a specific subset of private equity funds.
Use active North American buyout funds from the provided data. Calculate total capital calls by calendar month, treating months without capital calls as zero. The rolling average should use the current month and up to the two preceding calendar months.
month, monthly_capital_calls, and rolling_three_month_averagemonth ascending| Column | Type | Description |
|---|---|---|
| fund_idPK | INT | Unique fund identifier |
| fund_name | VARCHAR(150) | Fund name |
| strategy | VARCHAR(50) | Private equity investment strategy |
| status | VARCHAR(30) | Current fund status |
| region | VARCHAR(50) | Primary investment region |
| Column | Type | Description |
|---|---|---|
| capital_call_idPK | INT | Unique capital call identifier |
| fund_id | INT | Referenced fund identifier |
| call_date | DATE | Date the capital call was issued |
| call_amount | DECIMAL(14,2) | Capital call amount in millions of dollars |