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