Calculate a moving average for TaskRabbit metrics using SQL.
Use the taskrabbit_metrics table and calculate a three-observation moving average for completed_tasks. Ignore rows where the metric value is NULL.
completed_tasks observation.metric_date, metric_name, and moving_average.moving_average to two decimal places and order by metric_date ascending.| Column | Type | Description |
|---|---|---|
| metric_idPK | INT | Unique metric observation identifier |
| metric_name | VARCHAR(100) | Name of the TaskRabbit metric |
| metric_date | DATE | Date of the metric observation |
| metric_value | DECIMAL(12,2) | Observed metric value |