Popular science questions per month in layman tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

select [Month], 
       sum(case when  tags like '%popular-science%' then 1 else 0 end) Popsci,
       sum(case when  tags like '%everyday-life%' then 1 else 0 end) Everydaylife,
              sum(case when  tags like '%home-experiment%' then 1 else 0 end) HomeExp
from
(
  select CAST(
      cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01'
    as datetime) [Month], 
    PostTypeId,Tags
     
  from Posts p
) as X
group by [Month]
order by [Month] asc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results