View count of a post on Meta Stackexchange

0

Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Exchange

Q&A for meta-discussion of the Stack Exchange family of Q&A websites

declare @id int = ##ID:int##;

select
  count(case when voteTypeId = 2 then 1 else null end) as Upvotes,
  count(case when votetypeId = 3 then 1 else null end) as Downvotes
from
  votes
where
  voteTypeId in(2,3)
  and
  PostId = @id

Enter Parameters

Options:
Switch sites
loading Hold tight while we fetch your results