In the Data Explorer, how do I find the questions I have asked, which are answered but not accepted by me?
In search, I could do something like:
hasaccepted:0 user:id answers:1
I am looking for a similar Data Explorer query.
As mentioned in the comments it's a pretty straight forward query. That said there are some things we should know that can make this eaiser
Using the above I constructed the following query
With Questions as ( Select a.id , a.Score, RANK() OVER(PARTITION BY q.id ORDER BY a.score desc) rk From posts q INNER JOIN posts a ON q.id = a.ParentId Where q.OwnerUserID = ##UserId## And q.acceptedanswerid is null And a.Score >= ##MinAnswerScore:Int?0## ) Select id [Post Link], Score From Questions Where rk = 1
FROM posts q INNER JOIN posts a ON q.id = a.ParentIdensures that all
posts qare's questions that have at least one answer
RANK() OVER(PARTITION BY q.id ORDER BY a.score desc) rkcombined with
where rk = 1returns only the highest scored answers with the query. In case of ties for highest more than answer will be returned. (If you want only one change
When run for you with a minimum of 5 here are the results