instruction: Answer and Question Up and Down Votes. Find the total number of question and answer up and down votes on SO.
response: SELECT (CASE WHEN p.PostTypeId = 1 THEN 'Question' WHEN p.PostTypeId = 2 THEN 'Answer' END) AS "post_type", (CASE WHEN v.VoteTypeId = 2 THEN 'Up Vote' WHEN v.VoteTypeId = 3 THEN 'Down Vote' END) AS "vote_type", COUNT(*) AS Votes FROM Votes AS v JOIN Posts AS p ON v.PostId = p.Id WHERE v.VoteTypeId IN (2, 3) GROUP BY p.PostTypeId, v.VoteTypeId