ID Avg time to Close and Delete

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sound Design Meta

Q&A about the site for sound designers

select
  dateadd(month, datediff(month, 0, CreationDate), 0) as Mnth,
  sum(case when ClosedDate is not null then
      datediff(mi, CreationDate, ClosedDate)
      else 0 end)
      / sum (case when ClosedDate is not null then 1 else 0 end) as AvgTimeToClose,
  sum(case when DeletionDate is not null then
      datediff(mi, CreationDate, DeletionDate)
      else 0 end)
      / sum (case when DeletionDate is not null then 1 else 0 end) as AvgTimeToDelete
from PostsWithDeleted
where tags like '%identify%'
group by dateadd(month, datediff(month, 0, CreationDate), 0)
order by dateadd(month, datediff(month, 0, CreationDate), 0)

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results