instruction: mean answer score as function of response time.
response: WITH a AS (SELECT pa.Score, pq.CreationDate AS question_date, pa.CreationDate AS answer_date, DATEDIFF(day, pq.CreationDate, CreationDate) AS daydiff FROM Posts AS pa JOIN Posts AS pq ON pa.ParentId = pq.Id) SELECT daydiff, AVG(1.00 * Score) AS quality FROM a WHERE daydiff >= 0 AND daydiff <= 300 GROUP BY daydiff ORDER BY daydiff