.ไม่จำเป็นต้องใช้ทุกตาราง
.It is not neccessary to use all the tables.
 SuggestedEditVotes:  Id [ number]  SuggestedEditId [ number]  UserId [ number]  VoteTypeId [ number]  CreationDate [ time]  TargetUserId [ number]  TargetRepChange [ number] 
SELECT Id AS "post_link", Votes, Upvotes, Downvotes, Upvotes * 1.0 / Votes FROM (SELECT p.Id, COUNT(CASE WHEN VoteTypeId = 2 THEN 1 END) AS "upvotes", COUNT(CASE WHEN VoteTypeId = 3 THEN 1 END) AS "downvotes", COUNT(CASE WHEN VoteTypeId = 2 OR VoteTypeId = 3 THEN 1 END) AS "votes" FROM Posts AS p INNER JOIN Votes AS v ON p.Id = v.PostId WHERE p.PostTypeId = 1 AND p.ClosedDate IS NULL GROUP BY p.Id)