Question Score June 2012, with Vote Creation Date

0

Please login or register to vote for this query.

(click on this box to dismiss)

Italian Language Meta

Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian language

SELECT SUM(CASE Votes.VoteTypeId WHEN 2 THEN 1 ELSE 0 END)
    - SUM(CASE Votes.VoteTypeId WHEN 3 THEN 1 ELSE 0 END) score,
    Users.DisplayName
   FROM Posts
   INNER JOIN Users ON Users.ID = Posts.OwnerUserId
   INNER JOIN Votes ON Votes.PostId = Posts.Id
   WHERE PostTypeId = 1
   AND Posts.CreationDate BETWEEN '2012-06-01' AND '2012-06-30'
   AND Votes.CreationDate BETWEEN '2012-06-01' AND '2012-06-30'
   GROUP BY Users.DisplayName
   ORDER BY score DESC

Enter Parameters

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