Your question is SQL Join and Daily Aggregation. Start with the requirements and the one table 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.
Alpaca's trading operations team needs a daily summary of executions shown in its brokerage activity reporting. Write a PostgreSQL query against the execution records.
execution_status is filled.execution_time, returning the number of filled executions and total notional.| Column | Type | Description |
|---|---|---|
| execution_idPK | INT | Unique execution identifier |
| account_id | VARCHAR(20) | Alpaca brokerage account identifier |
| execution_time | TIMESTAMP | Timestamp when the execution was recorded |
| execution_status | VARCHAR(20) | Current execution status |
| notional | DECIMAL(12,2) | Dollar value of the execution |