Vote Counts for Answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Code Review

Q&A for peer programmer code reviews

select vt.name as VoteType, count(*) as "VoteCount"
from VoteTypes vt,
     Votes v,
     Posts p
where vt.id = v.VoteTypeId
  and v.PostId = p.id
  and p.PostTypeId = 2
group by vt.name

Enter Parameters

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