Using the "Search Q&A" tool, is there a way to search for a particular term in the question, but with an answer by a particular user?

I don't actually mind whether the query returns questions or answers; the important thing is that I know the question body contains the term I am looking for, the answer probably doesn't (but might), and I want to find the posts that include an answer from a particular user.

For example I might want to find a question where the question contains the string "Pearson correlation" which was answered by user with ID 919 but the answer might not have contained that term. (In various use cases, the term may be a tag but more usually will just be a string; if it works in a non-obviously different way when it's a tag, it would be useful to highlight that, but an acceptable answer needn't do so.)

1 Answer 1


As far as I know, this can't be done via the search bar, but you can use Data Explorer.

Try a version of the following:

SELECT q.id as [Post Link]
from posts q
inner join posts a on q.id = a.parentid
where a.owneruserid=##UserId##
and q.body like '%##Text##%'

This searches for questions containing the string represented by Text that were answered by a user with ID userId.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .