They asked you to use SQL queries to partition data set.
Use the provided trades and instruments tables. Return every trade, including trades without matching instrument metadata, and assign each trade a position within its instrument based on descending notional.
trade_id, symbol, asset_class, trade_date, notional, and trade_positionsymbol ascending, then trade_position ascending| Column | Type | Description |
|---|---|---|
| instrument_idPK | INT | Unique instrument identifier |
| symbol | VARCHAR(20) | Tradable instrument symbol |
| asset_class | VARCHAR(30) | Instrument asset classification |
| Column | Type | Description |
|---|---|---|
| trade_idPK | INT | Unique trade identifier |
| instrument_id | INT | Referenced instrument identifier |
| trade_date | DATE | Trade execution date |
| notional | NUMERIC(14,2) | Trade notional value |