How Unsung am I? (Fixed Ver. Includes %)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Zero and non-zero accepted count. Self-accepted answers do not count.

Engineering

Q&A for professionals and students of engineering

-- How Unsung am I?
-- Zero and non-zero accepted count. Answers must be old enough, not self-accepted and not Community Wiki.
-- Answers must be at least 10 days old to qualify.
-- Click on the results[1/2] to view when this data was updated.

select
    count(a.Score) 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
where
      a.CommunityOwnedDate is null
  and a.OwnerUserId = ##UserId##
  and q.OwnerUserId != ##UserId##
  and a.postTypeId = 2
  and a.CreationDate <= DATEADD(day, -7, GETDATE())
select create_date as [Last Updated at]
from sys.databases
where name = 'StackOverflow'

Enter Parameters

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