Up & Down Votes


Please login or register to vote for this query.

(click on this box to dismiss)

Code Review

Q&A for peer programmer code reviews

With Votings as (
       VoteTypes.Name as VoteType,
       PostTypes.Name as PostType,
       Votes.CreationDate as CreationDate,
       Count(Votes.Id) as Tally
    From Votes
    Inner Join VoteTypes on Votes.VoteTypeId = VoteTypes.Id
    Inner Join Posts on Votes.PostId = Posts.Id
    Inner Join PostTypes on Posts.PostTypeId = PostTypes.Id
    Where Posts.PostTypeId in (1,2)
    And VoteTypes.Id in (2,3)
    Group By VoteTypes.Name, PostTypes.Name, Votes.CreationDate

Select VoteType, PostType, CreationDate, Tally 
From Votings 
Order By CreationDate DESC

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results