Given a table of order executions, write a query to find the top 5 most traded options contracts per day, partitioned by underlying asset.
Treat traded volume as the sum of quantity. A contract is identified by contract_symbol, and the trading day comes from executed_at.
trade_date, underlying_asset, contract_symbol, total_quantity, and contract_rank.| Column | Type | Description |
|---|---|---|
| execution_idPK | BIGINT | Unique execution identifier |
| executed_at | TIMESTAMPTZ | Timestamp when the execution occurred |
| underlying_asset | VARCHAR(32) | Underlying asset for the option contract |
| contract_symbol | VARCHAR(64) | Option contract identifier |
| quantity | NUMERIC(18,2) | Number of contracts executed |