On which of user A's questions has user B commented?

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",
  cu.Id AS "Who Commented",
  cu.DisplayName AS "Who Commented",
  q.Id AS "Question ID", 
  q.Id AS [Post Link]
FROM Posts q
  JOIN Comments c on c.PostId = q.Id
  JOIN Users qu ON qu.Id = q.OwnerUserId
  JOIN Users cu ON cu.Id = c.UserId
WHERE q.PostTypeId = 1 -- question
  AND q.OwnerUserId = ##WhoAsked:int##
  AND c.UserId = ##WhoCommented:int##

Enter Parameters

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