s โดย UserID ไม่จำเป็นต้องใช้ตารางทั้งหมด
s by UserID.It is not neccessary to use all the tables.
 PostNoticeTypes:  Id [ number]  ClassId [ number]  Name [ text]  Body [ text]  IsHidden [ boolean]  Predefined [ boolean]  PostNoticeDurationId [ number] 
SELECT question.Id AS "post_link", answers.CreationDate, answers.Id AS "post_link", answers.OwnerUserId AS "user_link", cr.Name FROM Posts AS answers INNER JOIN Posts AS question ON question.Id = answers.ParentId INNER JOIN PostHistory AS ph ON ph.PostId = question.Id INNER JOIN CloseReasonTypes AS cr ON cr.Id = ph.Comment WHERE answers.OwnerUserId = '##UserId##' AND answers.PostTypeId = 2 AND NOT question.ClosedDate IS NULL AND ph.PostHistoryTypeId = 10 AND (ph.Comment LIKE '1' OR ph.Comment LIKE '101') ORDER BY answers.CreationDate DESC