Questions and Answers per Month - not NNs

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

select [Month], 
       sum(case when 0 < 1 then 1 else 0 end) All_Questions,
       sum(case when AnswerCount > 0 then 1 else 0 end) Questions_with_Answers
from
(
  select CAST(
      cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01'
    as datetime) [Month], 
    AnswerCount
     
  from Posts p
  where ClosedDate is NULL
  and PostTypeId = 1
  and Tags LIKE '%machine-learning%'
) as X
group by [Month]
order by [Month] asc

Enter Parameters

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