Number of up- and downvotes per day

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

SELECT LEFT(CONVERT(varchar, CreationDate,112),6) as 'CreationDate',
  SUM(CASE VoteTypeId WHEN 2 THEN 1 ELSE 0 END) AS 'Upvotes',
  SUM(CASE VoteTypeId WHEN 3 THEN 1 ELSE 0 END) AS 'Downvotes'
  FROM Votes
  WHERE CreationDate >= '2010-01-01'
    AND VoteTypeId IN (2, 3)
  GROUP BY LEFT(CONVERT(varchar, CreationDate,112),6)
  ORDER BY LEFT(CONVERT(varchar, CreationDate,112),6)

Enter Parameters

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