Quality vs. Quantity — A user's reputation breakdown

3

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

-- What question/answers most contribute to the user's score.
-- Adapted from http://data.stackexchange.com/stackoverflow/query/162729/reputation-history

with scores as (
  select 
    PostId,
    sum(case posts.OwnerUserId
          when ##UserId## then (
            case VoteTypeId
              when 1 then 15
              when 2 then 
                case PostTypeId
                  when 1 then 
                    case when votes.CreationDate >= '03/19/2010' then 5
                         when votes.CreationDate < '03/19/2010' then 10
                    end
                  when 2 then 10
                end
              when 3 then -2 
              when 16 then 2
            end
          )
        end) as score
  from votes inner join posts on posts.Id = votes.PostId
  where posts.OwnerUserId = ##UserId##
    and posts.CommunityOwnedDate is null
  group by votes.PostId
)
select PostId as [Post Link], sum(score) as Reputation
from  scores
group by PostId
order by Reputation desc

Enter Parameters

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