Write a query to identify the top-performing assets over the last three quarters.
Use assets and asset_quarterly_performance. Define performance as the sum of valid quarterly returns, and include only assets with valid results for all three quarters.
asset_id, asset_name, total_return, quarters_reported, and performance_rank.| Column | Type | Description |
|---|---|---|
| asset_idPK | INT | Unique asset identifier |
| asset_name | VARCHAR(100) | Asset display name |
| asset_class | VARCHAR(50) | Investment asset classification |
| Column | Type | Description |
|---|---|---|
| performance_idPK | INT | Unique performance record identifier |
| asset_id | INT | Referenced asset identifier |
| quarter_end | DATE | Quarter-ending date |
| quarterly_return | DECIMAL(8,4) | Asset return for the quarter |