Number of votes (upvotes/downvotes) per day

1

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
  CAST(CreationDate AS DATE),
  SUM(Case When VoteTypeId=2 Then 1 Else 0 End) AS UpVotes,
  SUM(Case When VoteTypeId=3 Then 1 Else 0 End) AS DownVotes,
  SUM(Case When VoteTypeId IN (2,3) Then 1 Else 0 End) AS [Up and Down],
  COUNT(Id) AS [All Votes]
FROM Votes
WHERE (CreationDate >= '##Date1?2019-01-01##') AND (CreationDate <= '##Date2?2022-01-01##')
GROUP BY CAST(CreationDate AS DATE)
ORDER BY CAST(CreationDate AS DATE)

Enter Parameters

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