Your question is Top Trading Days by Volume. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Deutsche Börse Group wants to monitor peak activity on the Xetra trading venue. Write a PostgreSQL query that identifies the highest-volume trading day or days in each calendar month.
trades to instruments and include only trades for valid instruments.EXECUTED trades on Xetra with a non-null volume.| Column | Type | Description |
|---|---|---|
| trade_idPK | INTEGER | Unique trade identifier |
| instrument_id | INTEGER | Referenced instrument identifier |
| executed_at | TIMESTAMP | Timestamp when the trade was executed |
| volume | BIGINT | Number of units traded |
| trade_status | VARCHAR(20) | Trade lifecycle status |
| venue | VARCHAR(30) | Trading venue |
| Column | Type | Description |
|---|---|---|
| instrument_idPK | INTEGER | Unique instrument identifier |
| symbol | VARCHAR(20) | Instrument trading symbol |
| product_name | VARCHAR(100) | Instrument product name |
| asset_class | VARCHAR(30) | Instrument asset class |