Returns the reputation development for the given userid - by date. For simplicity, only votes/accepts on answers are considered - no rep cap, no badges. Feel free to fork :-)
Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games
with scores as (select cast(votes.CreationDate as Date) as date, sum(case VoteTypeId when 1 then 15 when 2 then 10 when 3 then -2 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.CreationDate) select date, sum(score) over (order by date) from scores