instruction: Distribution of Hours to Close a Duplicate Question.
response: SELECT diff1 AS hoursToClose, COUNT(*) FROM (SELECT CAST((JULIANDAY(ClosedDate) - JULIANDAY(d.CreationDate)) * 24.0 AS INT) AS "diff1", TIME_TO_STR(d.CreationDate, '%y-%m') AS "date1", TIME_TO_STR(d.ClosedDate, '%y-%m') AS "date2", (d.Id) AS id FROM Posts AS d LEFT JOIN PostHistory AS ph ON ph.PostId = d.Id LEFT JOIN PostLinks AS pl ON pl.PostId = d.Id LEFT JOIN Posts AS o ON o.Id = pl.RelatedPostId WHERE d.PostTypeId = 1 AND pl.LinkTypeId = 3 AND ph.PostHistoryTypeId = 10) AS t1 GROUP BY diff1 ORDER BY diff1