Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation
Count(*) as Total,
Sum(Case When P.ClosedDate is not Null Then 1 Else 0 End) as Closed,
Round(Cast(Sum(Case When P.ClosedDate is not Null Then 1 Else 0 End) as Decimal)/Count(*)*100, 2) as '% Closed'
From Tags T
Join PostTags PT on PT.TagId = T.Id
Join Posts P on P.Id = PT.PostId and PostTypeId = 1
Where T.TagName = ##TagName:String?homebrew##