Number of votes on answers and votes on questions per month (in a given tag)


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for professional mathematicians

  COUNT(v.Id) AS [Total Upvotes],
  SUM(CASE WHEN p.PostTypeId=1 THEN 1 ELSE 0 END) AS [Question Upvotes],
  SUM(CASE WHEN p.PostTypeId=2 THEN 1 ELSE 0 END) AS [Answer Upvotes]
FROM Posts p INNER JOIN Votes v ON v.PostId = p.Id
WHERE v.VoteTypeId=2
---VoteTypeId=2 Upvotes
---VoteTypeId=3 Downvotes
AND (p.Tags LIKE '%<##tagname?set-theory##>%') OR
  p.ParentId IN (SELECT Id FROM Posts WHERE (Tags LIKE '%<##tagname##>%'))
---filter only posts from the given tag
GROUP BY eomonth(v.CreationDate)
ORDER BY eomonth(v.CreationDate)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results