ค้นหากิจกรรมที่เกิดขึ้นพร้อมกันระหว่างผู้ใช้สองคน ไม่จำเป็นต้องใช้ตารางทั้งหมด
Find coincident activity between two users.It is not neccessary to use all the tables.
 ReviewTaskResultTypes:  Id [ number]  Name [ text]  Description [ text] 
WITH Interesting(UserId) AS (SELECT 342852 UNION ALL SELECT 57611) SELECT PostId = p.Id, QuestionId = COALESCE(a.Id, p.Id), AnswerId = CASE WHEN p.PostTypeId = 2 THEN p.Id ELSE NULL END FROM Posts AS p LEFT JOIN Posts AS a ON p.PostTypeId = 2 AND p.ParentId = a.Id WHERE EXISTS(SELECT * FROM Interesting AS i WHERE p.OwnerUserId = i.UserId) OR EXISTS(SELECT * FROM Interesting AS i WHERE a.OwnerUserId = i.UserId)