s และคำตอบ ไม่จำเป็นต้องใช้ทุกตาราง
s and answers.It is not neccessary to use all the tables.
 ReviewTaskStates:  Id [ number]  Name [ text]  Description [ text] 
SELECT CASE WHEN PostTypeId = 1 THEN 'Questions' ELSE 'Answers' END AS "post_type", CASE WHEN VoteTypeId = 2 THEN 'Up Votes' ELSE 'Down Votes' END AS "vote_type", COUNT(*) AS "count" FROM Posts AS p INNER JOIN Votes AS v ON p.Id = v.PostId WHERE p.ClosedDate IS NULL AND (p.PostTypeId = 1 OR p.PostTypeId = 2) AND (v.VoteTypeId = 2 OR v.VoteTypeId = 3) GROUP BY p.PostTypeId, v.VoteTypeId