This query will return, for a user, the list of question where his answer has been accepted but some others answer has better score
Q&A for speakers of other languages learning English
-- Question where my answer has been accepted but some answer has better score than mine -- This query will return, for a user, the list of question where his answer has been accepted but some others answer has better score SELECT Q.id as Qid, Q.title as Qtitle, myA.id as myAid, myA.Body as myAbody, allA.id as OthersAid, allA.Body as OthersAbody FROM Posts myA, Posts allA, Posts Q WHERE Q.id=allA.ParentId AND Q.AcceptedAnswerId=myA.id AND myA.OwnerUserId = ##UserId## AND myA.PostTypeId = 2 AND allA.PostTypeId = 2 AND allA.score > myA.score