Questions asked by user X and answered by user Y

1

Please login or register to vote for this query.

(click on this box to dismiss)

Code Review

Q&A for peer programmer code reviews

DECLARE @askerId AS INT = ##AskerID:int##
DECLARE @answererId AS INT = ##AnswererID:int##

SELECT TOP ##Limit:int?100##
  q.Id [Post Link],
  q.CreationDate,
  q.Score Q,
  a.Score A,
  q.AnswerCount Ans,
  CASE WHEN q.AcceptedAnswerId IS NOT NULL THEN 1 ELSE null END Acc,
  q.ViewCount Views,
  q.FavoriteCount Fav,
  q.Tags,
  q.ClosedDate
FROM Posts q
JOIN Posts a
  ON q.OwnerUserId = @askerId
  AND a.ParentId = q.Id
  AND a.OwnerUserId = @answererId
ORDER BY q.CreationDate DESC

Enter Parameters

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