ต่อแท็ก ไม่จำเป็นต้องใช้ทุกตาราง
s per tag.It is not neccessary to use all the tables.
 ReviewTasks:  Id [ number]  ReviewTaskTypeId [ number]  CreationDate [ time]  DeletionDate [ time]  ReviewTaskStateId [ number]  PostId [ number]  SuggestedEditId [ number]  CompletedByReviewTaskId [ number] 
SELECT COALESCE(c.TargetTagName, b.TargetTagName, a.TargetTagName, Tags.TagName) AS "tagname", COUNT(Posts.ClosedDate) AS closed, COUNT(*) - COUNT(Posts.ClosedDate) AS "open" FROM Posts JOIN PostTags ON (Posts.Id = PostTags.PostId) JOIN Tags ON (PostTags.TagId = Tags.Id) LEFT JOIN TagSynonyms AS a ON (Tags.TagName = a.SourceTagName) LEFT JOIN TagSynonyms AS b ON (a.TargetTagName = b.SourceTagName) LEFT JOIN TagSynonyms AS c ON (b.TargetTagName = c.SourceTagName) WHERE Posts.PostTypeId = 1 GROUP BY COALESCE(c.TargetTagName, b.TargetTagName, a.TargetTagName, Tags.TagName) ORDER BY COUNT(*) - COUNT(Posts.ClosedDate), COUNT(*)