People who answered my questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @UserId int = ##UserId##

-- SELECT USERS THAT INTERACTED WITH MY QUESTIONS
SELECT OwnerUserId, DisplayName, Location, Count(*) As Answers
FROM Posts
JOIN Users ON Posts.OwnerUserId = Users.Id
WHERE ParentId IN (
  -- SELECT MY QUESTIONS
  SELECT Id
  FROM Posts
  WHERE OwnerUserId = @UserId
    AND PostTypeId = 1
)
GROUP BY OwnerUserId, DisplayName, Location
ORDER BY Answers DESC

Enter Parameters

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