Which of user A's questions have been answered by user B?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

SELECT
  qu.Id AS "Who Asked",
  qu.DisplayName AS "Who Asked",
  au.Id AS "Who Answered",
  au.DisplayName AS "Who Answered",
  q.Id AS "Question ID", 
  q.Title AS "Title"
FROM Posts a
  JOIN Posts q ON a.ParentId = q.Id
  JOIN Users qu ON qu.Id = q.OwnerUserId
  JOIN Users au ON au.Id = a.OwnerUserId
WHERE q.PostTypeId = 1 -- question
  AND a.PostTypeId = 2 -- answer
  AND q.OwnerUserId = ##WhoAsked:int##
  AND a.OwnerUserId = ##WhoAnswered:int##

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results