Dependability

1

Please login or register to vote for this query.

(click on this box to dismiss)

A user's non-CW answers which are highest-voted in the thread, excluding those which are the only answers to a question. Inspired by http://meta.stackoverflow.com/questions/103268/should-there-be-a-dependable-badge

Stack Overflow

Q&A for programmers

-- Dependability
-- A user's non-CW answers which are highest-voted in the thread, excluding those which are the only answers to a question.
-- Inspired by http://meta.stackoverflow.com/questions/103268/should-there-be-a-dependable-badge

-- Post types
declare @question_type int = 1
declare @answer_type int = 2

select a.Id as [Post Link]
from Posts as a
inner join Posts as q on q.Id = a.ParentId
where
  q.PostTypeId = @question_type and a.PostTypeId = @answer_type and
  a.OwnerUserId = ##UserID## and
  q.CommunityOwnedDate is null and -- not CW
  q.AnswerCount > 1 and            -- not the only answer
  a.Score > (select max(s.Score)
             from Posts as s -- sibling answers
             where s.Id != a.Id and s.ParentId = a.ParentId)

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached