Count combinations of mandatory tags on meta

0

Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Overflow

Q&A about the site for professional and enthusiast programmers

with MandatoryTags as (select
  case when Tags like '%<discussion>%'      then 1 else 0 end as [Discussion],
  case when Tags like '%<support>%'         then 1 else 0 end as [Support],
  case when Tags like '%<bug>%'             then 1 else 0 end as [Bug],
  case when Tags like '%<feature-request>%' then 1 else 0 end as [Feature]
from Posts
where PostTypeId = 1
  and ClosedDate is null
  and CreationDate >= ##StartDate:string?2017-09-01##
  and CreationDate < ##EndDate:string?2017-10-01##
), TotalSum as (
  select count(*) as [Total] from MandatoryTags
)
select
  count(*) as [Count],
  count(*) / [Total] as [Fraction],
  [Discussion], [Support], [Bug], [Feature]
from MandatoryTags, TotalSum
group by
  [Total], [Discussion], [Support], [Bug], [Feature]

Enter Parameters

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