Write a SQL query to join two tables and calculate the rolling average of survey responses over a specific time window.
Use the provided survey questions and responses data. Restrict responses to January 1 through January 10, 2025, and calculate the rolling average over the current date and preceding six calendar days.
response_id, question_text, survey_date, response_score, and rolling_avg_7_days.question_id, survey_date, and response_id ascending.question_id.rolling_avg_7_days to two decimal places.response_score values from averages while retaining their response rows.| Column | Type | Description |
|---|---|---|
| question_idPK | INT | Unique survey question identifier |
| question_text | VARCHAR(255) | Text presented to survey respondents |
| topic | VARCHAR(100) | Survey topic |
| Column | Type | Description |
|---|---|---|
| response_idPK | INT | Unique response identifier |
| question_id | INT | Referenced survey question |
| survey_date | DATE | Date the response was recorded |
| response_score | NUMERIC(4,2) | Numeric survey response score |