Q&A for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO
with a as ( select pa.Score, pq.CreationDate as question_date, pa.CreationDate as answer_date, DATEDIFF(hh, pq.CreationDate, pa.CreationDate) daydiff from Posts pa join Posts pq on pa.ParentId = pq.Id ) select daydiff, avg(1.00*Score) quality from a where daydiff >=0 and daydiff <= 300 group by daydiff order by daydiff