Not accepted self answers with negative votes

0

Please login or register to vote for this query.

(click on this box to dismiss)

Answers probably to flag

Ask Ubuntu

Q&A for Ubuntu users and developers

-- Not accepted self answers with negative votes
-- Answers probably to flag

select top 500 
       selfAnswer.Body,
       selfAnswer.Id as [Post Link], 
       selfAnswer.CreationDate, 
       len(selfAnswer.Body) as Length,
       selfAnswer.Score as Score,
       question.ViewCount
from posts as question
    inner join posts as allAnswers
        on allAnswers.parentid = question.id
    inner join posts as selfAnswer
        on  selfAnswer.owneruserid = question.owneruserid
        and selfAnswer.parentid = question.id
where selfAnswer.Score <= 0
and question.posttypeid = 1
and selfAnswer.posttypeid = 2
and (    question.acceptedAnswerId != selfAnswer.id 
      or question.acceptedAnswerId is null)
and question.ViewCount < 1000
and len(selfAnswer.Body) < 200
and YEAR(selfAnswer.creationDate) = 2011
and MONTH(selfAnswer.creationDate) > 5
group by selfAnswer.Id, 
         selfAnswer.CreationDate, 
         len(selfAnswer.Body),
         selfAnswer.Score,
         question.ViewCount,
         selfAnswer.Body
having count(distinct allAnswers.id) > 1
order by selfAnswer.Score asc,
         len(selfAnswer.Body) asc, 
         selfAnswer.CreationDate desc

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results