Q&A for those involved in the field of teaching Computer Science
-- For a given user, show me the number of questions they have marked answered -- for another user, -- where they have at least 2 answers SELECT * FROM dbo.Posts AS A LEFT OUTER JOIN dbo.Posts AS Q ON Q.Id = A.ParentId WHERE A.OwnerUserId = 9517769 /* User in question */ AND A.PostTypeId = 2 /* Answer */ AND A.id = 65764991 ORDER BY A.AcceptedAnswerId desc;