Total number of votes of

0

Please login or register to vote for this query.

(click on this box to dismiss)

posttype = 1 for questions, = 2 for answers votetype = 2 for upvotes, = 3 for downvotes

Stack Overflow на русском

Вопросы и ответы для программистов

select count(v.Id) from Votes v
inner join posts p on p.Id = v.PostId 
  where p.PostTypeId = ##posttype## and
  v.VoteTypeId = ##votetype##

Enter Parameters

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