Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

  count(distinct q.Id) as postcount, --comment out to list all Qs
  round(cast(avg(cast(datediff(second, q.CreationDate, a.CreationDate) 
  as bigint)) as float)/3660,2) as [MTTR_hours]
from posts q, posts a, posthistory ah
where a.ParentId = q.Id -- match questions answers
  and ah.PostId = a.Id -- consider answer's history
  and ah.PostHistoryTypeId = 2 -- answer post must be text
  and datediff(second, q.CreationDate, a.CreationDate) > 0
--  and a.OwnerUserId <> q.OwnerUserId -- not self answered
  and q.Tags like '%<##tag?amazon-sagemaker##>%'
  and q.CreationDate >= '2022-02-13'
  and q.CreationDate < '2022-2-20'

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results