TÜV SÜD quality teams monitor inspection measurements across testing facilities. Write a PostgreSQL query that calculates a rolling average of each test result over the current date and the previous 29 calendar days.
| Column | Type | Description |
|---|---|---|
| facility_idPK | INTEGER | Unique testing facility identifier |
| facility_name | VARCHAR(100) | TÜV SÜD testing facility name |
| Column | Type | Description |
|---|---|---|
| test_type_idPK | INTEGER | Unique test type identifier |
| test_type_name | VARCHAR(100) | Inspection test name |
| Column | Type | Description |
|---|---|---|
| result_idPK | INTEGER | Unique test result identifier |
| facility_id | INTEGER | Facility reference |
| test_type_id | INTEGER | Test catalog reference |
| tested_at | TIMESTAMP | Test completion timestamp |
| result_value | NUMERIC(10,2) | Measured test result |