The true unsung heros (broadened)

0

Please login or register to vote for this query.

(click on this box to dismiss)

List of users with at least 2 zero-score accepted answers, sorted by ratio of zero to non zero score

Open Data

Q&A for developers and researchers interested in open data

-- Enter Query Title
-- Enter Query Description

select X.*, u.Reputation from (
  select a.OwnerUserId [User Link], 
    sum(case when a.Score = 0 then 0 else 1 end) as [Non Zero Score Answers],  
    sum(case when a.Score = 0 then 1 else 0 end) as [Zero Score Answers],
    ROUND(avg(case when a.Score = 0 then 100.0 else 0.0 end), -1) as Percentage
  from Posts q
  join Posts a on a.Id = q.AcceptedAnswerId 
  where a.CommunityOwnedDate is null and a.OwnerUserId is not null
    and a.OwnerUserId <> isnull(q.OwnerUserId,-1)
  group by a.OwnerUserId
  having sum(case when a.Score = 0 then 1 else 0 end) > 1
) as X 
join Users u on u.Id = [User Link]
order by x.Percentage desc

Enter Parameters

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