Users with lots of poor-scoring answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Specify maximum answer score and minimum number of answers

Stack Overflow

Q&A for programmers

-- Users with lots of poor-scoring answers
-- Specify maximum answer score and minimum number of answers

DECLARE @ScoreThreshold int = ##ScoreThreshold##
DECLARE @AnswerThreshold int = ##AnswerThreshold##

Select OwnerUserId As [User Link],
       (Select Count(*) From Posts p Where p.OwnerUserId=Posts.OwnerUserId And Score<=@ScoreThreshold And posttypeid=2 And communityowneddate is Null) * 100.0 / Count(*) As [% Below Threshold],
       Count(*) As [Total Answers]
From Posts
Where posttypeid=2 And communityowneddate is Null
Group By owneruserid
Having Count(*) > @AnswerThreshold
Order By [% Below Threshold] Desc

Enter Parameters

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