Q&A for people interested in the history and origins of science and mathematics
Select count(VoteTypeId) as 'total votes', SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END) AS 'number of up votes', SUM(CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END) AS 'number of down votes' From PostFeedback where postid=11227809