ค้นหาโพสต์ตามแท็กและคำหลักพร้อมคำตอบ จำกัดผลลัพธ์ไว้ที่โพสต์ด้วยคำตอบตรวจสอบ ไม่จำเป็นต้องใช้ตารางทั้งหมด
Search post based on tag and keyword with answers. Limited the results to the posts with check answerIt is not neccessary to use all the tables.
 PostNoticeTypes:  Id [ number]  ClassId [ number]  Name [ text]  Body [ text]  IsHidden [ boolean]  Predefined [ boolean]  PostNoticeDurationId [ number] 
SELECT p.Id AS "post_link", p.Id, p.Title, p.CommentCount, p.Body, c.Text, p.ViewCount, a.Score FROM Posts AS p LEFT JOIN Comments AS c ON p.Id = c.PostId INNER JOIN Posts AS a ON a.ParentId = p.Id WHERE p.PostTypeId = 1 OR p.PostTypeId = 2 AND p.Tags = '%##tagname##%' AND p.Title LIKE '%##keyword##%' ORDER BY ViewCount DESC