Reputation history (accurate, including everything except bounties)

3

Please login or register to vote for this query.

(click on this box to dismiss)

Accurate for all up/down votes, including rep cap and even accepting answers to your own questions

Physics

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

select
  date,
  acceptScore 
    + case when upVoteScore > 200 then 200 else upVoteScore end 
    + downVoteScore score
from (
select convert(nvarchar(10), date, 120) date, sum(acceptScore) acceptScore,
sum(upVoteScore) upVoteScore, sum(downVoteScore) downVoteScore
from (
select
  cast(v.CreationDate as Date) as date,
  sum(case when v.VoteTypeId = 1 then 15 else 0 end) as acceptScore,
  sum(case
    when v.VoteTypeId = 2 and p.PostTypeId = 1 then 5
    when v.VoteTypeId = 2 and p.PostTypeId = 2 then 10
    else 0 end) as upVoteScore,
  sum(case when v.VoteTypeId = 3 then -2 else 0 end) as downVoteScore
from votes v
join posts p on p.Id = v.PostId 
  and p.posttypeid in (1,2) and p.OwnerUserId = ##UserId##
  and p.CommunityOwnedDate is null
where v.creationDate between dateadd(d, -##days##, getdate()) and getdate()
group by cast(v.CreationDate as Date)
union
select
  cast(v.CreationDate as Date), sum(2), 0, 0
from votes v
join posts p on p.posttypeid = 2 and p.id = v.postid
join posts q on p.parentid = q.id and q.OwnerUserId = ##UserId##
where v.creationDate between dateadd(d, -21, getdate()) and getdate()
and v.VoteTypeId = 1
group by cast(v.CreationDate as Date)
) x
group by date) y
order by 1 desc

Enter Parameters

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