Number of posts a user got downvoted in a time span

0

Please login or register to vote for this query.

(click on this box to dismiss)

Engineering

Q&A for professionals and students of engineering

SELECT Users.Id as [User Link], COUNT(*) Downvotes
   FROM (
      SELECT DISTINCT Votes.PostId FROM Votes 
         WHERE Votes.CreationDate BETWEEN '2012-06-01' AND '2012-06-30'
           AND Votes.VoteTypeId = 3
   ) Votes
   INNER JOIN Posts ON Votes.PostId = Posts.Id
   INNER JOIN Users ON Posts.OwnerUserId = Users.Id
   GROUP BY Users.Id
   ORDER BY Downvotes DESC

Enter Parameters

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