Which posts have two users both commented on?

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
  c1.PostId as [Post Link]
FROM
  Comments c1
INNER JOIN Comments c2 ON
  c1.PostId = c2.PostId
WHERE
  c1.UserId = ##UserId1## AND
  c2.UserId = ##UserId2##
GROUP BY
  c1.PostId
ORDER BY
  MIN(c1.CreationDate) ASC

Enter Parameters

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