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)