Comments from users with display names that look like unregistered

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

SELECT TOP(100)
c.PostId AS [Post Link],
u.DisplayName,
c.Text
FROM Comments c
JOIN Users u ON c.UserId = u.Id
JOIN Posts p ON c.PostId = p.Id
LEFT OUTER JOIN posts q on p.ParentId = q.Id
WHERE u.DisplayName like 'user5%'
AND ((p.PostTypeId = 1 AND p.OwnerUserId != c.UserId)
  OR (p.PostTypeId = 2
      AND p.OwnerUserId != c.UserId
      AND q.OwnerUserId != c.UserId))

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results