Q&A for professional and enthusiast programmers
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