Unsung Posts

4

Please login or register to vote for this query.

(click on this box to dismiss)

Raspberry Pi

Q&A for users and developers of hardware and software for Raspberry Pi

select
    a.OwnerUserId as [User Link],
    u.LastAccessDate,
    count(a.Id) as [Accepted Answers],
    sum(case when a.Score = 0 then 0 else 1 end) as [Scored Answers],  
    sum(case when a.Score = 0 then 1 else 0 end) as [Unscored Answers],
    sum(CASE WHEN a.Score = 0 then 1 else 0 end)*1000 / count(a.Id) / 10.0 as [Percentage Unscored]
from
    Posts q
  inner join
    Posts a
  on a.Id = q.AcceptedAnswerId
   join
    Users u
  on u.Id = a.OwnerUserId
where
      a.CommunityOwnedDate is null
  and q.OwnerUserId != a.OwnerUserId
  and a.postTypeId = 2
group by
    a.OwnerUserId, u.LastAccessDate
order by
    [Accepted Answers] desc

Enter Parameters

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