Positive score posts per month

0

Please login or register to vote for this query.

(click on this box to dismiss)

MathOverflow

Q&A for professional mathematicians

select
month(p.CreationDate), 
count(p.Id),
(select count(q.Id) 
  from Posts q where 
      year(q.CreationDate) = ##Year## and 
      month(q.CreationDate) = month(p.CreationDate) and
      q.Score > 0 and q.PostTypeId = 1),
(select count(r.Id) 
  from Posts r where 
      year(r.CreationDate) = ##Year## and 
      month(r.CreationDate) = month(p.CreationDate) and
      r.Score > 0 and r.PostTypeId = 2)
from Posts p
where year(p.CreationDate) = ##Year## and p.Score > 0 and p.PostTypeId <= 2
group by month(p.CreationDate)
order by month(p.CreationDate) asc

Enter Parameters

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