Q&A for professional and enthusiast programmers
select hours_to_first_answer, count(*) as answer_count from ( select qId, min(hours_to_answer) as hours_to_first_answer from (select questions.Id as qId, questions.CreationDate as qCreationDate, answers.Id as aId, answers.CreationDate as aCreationDate, DATEDIFF(hour, questions.CreationDate, answers.CreationDate) as hours_to_answer from Posts questions inner join Posts answers on questions.Id = answers.ParentId) qa group by qId ) latency group by hours_to_first_answer order by hours_to_first_answer