Votes of each type per day

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

-- Votes of each type per day

SELECT
  Str(Year(CreationDate), 4) + '-' + Str(Month(CreationDate), 2) + '-' + Str(Day(CreationDate), 2) AS 'Date',
  Count(ALL CASE VoteTypeId WHEN 1 THEN 1 ELSE NULL END) AS 'Accept',
  Count(ALL CASE VoteTypeId WHEN 2 THEN 1 ELSE NULL END) AS 'Up',
  Count(ALL CASE VoteTypeId WHEN 3 THEN 1 ELSE NULL END) AS 'Down',
  Count(ALL CASE VoteTypeId WHEN 4 THEN 1 ELSE NULL END) AS 'Offensive',
  Count(ALL CASE VoteTypeId WHEN 5 THEN 1 ELSE NULL END) AS 'Favorite',
  Count(ALL CASE VoteTypeId WHEN 6 THEN 1 ELSE NULL END) AS 'Close',
  Count(ALL CASE VoteTypeId WHEN 7 THEN 1 ELSE NULL END) AS 'Reopen',
  Count(ALL CASE VoteTypeId WHEN 8 THEN 1 ELSE NULL END) AS 'Bounty',
  Count(ALL CASE VoteTypeId WHEN 10 THEN 1 ELSE NULL END) AS 'Deletion',
  Count(ALL CASE VoteTypeId WHEN 11 THEN 1 ELSE NULL END) AS 'Undeletion',
  Count(ALL CASE VoteTypeId WHEN 12 THEN 1 ELSE NULL END) AS 'Spam',
  Count(ALL CASE VoteTypeId WHEN 15 THEN 1 ELSE NULL END) AS 'Review',
  Count(ALL CASE VoteTypeId WHEN 16 THEN 1 ELSE NULL END) AS 'Approve'
FROM Votes
GROUP BY CreationDate
ORDER BY CreationDate ASC

Enter Parameters

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