Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Is it possible to write a query that fetches just the question and the accepted answer while applying the ... userId of the user who posted the accepted answer... as the filter.

To be clearer, the query should find all the questions and just the accepted answer... wherein the accepted answer was in fact posted by me.


select question,acceptedAnswer from posts where acceptedAnswerPoster = @me
share|improve this question
up vote 3 down vote accepted


You can narrow down the columns you want, starting with this:

    FROM Posts q
    INNER JOIN Posts a ON q.AcceptedAnswerId = a.Id
    WHERE a.OwnerUserId = ##UserId##

Note that in the Data Explorer, there's no concept of "me," as the interface knows nothing about your accounts on the Stack Exchange sites.

share|improve this answer

You must log in to answer this question.

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