declare @QuestionCount float select @QuestionCount = cou...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Enter Query Title
-- Enter Query Description

declare @QuestionCount float
select @QuestionCount = count(Id) from Posts where PostTypeId = 1

select 
  OwnerUserID As [User Link],
  count(Id) aS AnswerCount,
  100 * count(Id) / @QuestionCount as PercentQuestionsAnswered
from
  Posts
where
  PostTypeId = 2 -- Answer
  and CommunityOwnedDate is null
group by
  OwnerUserId
having
  (100 * count(Id) / @QuestionCount) >= 1
order by AnswerCount desc 

Enter Parameters

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