Your question is Running 30-Day Average in SQL. 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.
GDIT's mission analytics dashboard needs a rolling view of completed transaction activity. Write a PostgreSQL query that calculates the 30-day moving average of daily completed transaction volume.
status = 'completed'.transaction_date before applying the window function.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| transaction_date | DATE | Date the transaction occurred |
| status | VARCHAR(20) | Transaction state, such as completed, pending, or cancelled |
| transaction_type | VARCHAR(30) | Operational transaction category |
| amount | NUMERIC(12,2) | Transaction amount |