Days you might have reputation capped

0

Please login or register to vote for this query.

(click on this box to dismiss)

Attempts to find days you got 20+ upvotes

Italian Language Meta

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

-- Days you might have reputation capped
-- Attempts to find days you got 20+ upvotes

DECLARE @UserId int = ##UserId##

SELECT CAST(Votes.CreationDate as DATE), SUM(CASE WHEN Votes.VoteTypeId = 2 THEN 10 WHEN Votes.VoteTypeId = 3 THEN -2 ELSE 0 END) as VoteRep
FROM Posts
JOIN Votes ON Posts.id = Votes.PostId
WHERE Posts.OwnerUserId = @UserID AND Votes.VoteTypeId = 2
GROUP BY CAST(Votes.CreationDate as DATE)
HAVING SUM(CASE WHEN Votes.VoteTypeId = 2 THEN 10 WHEN Votes.VoteTypeId = 3 THEN -2 ELSE 0 END) > 200
ORDER BY CAST(Votes.CreationDate as DATE)

Enter Parameters

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