my questions with an answer but none accepted

2

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

--Finds my questions without an accepted answer with at least one answer that meets the minimum answer score



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

Enter Parameters

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