Q&A about the site for gardeners and landscapers
select p.id, v.CreationDate , sum(2.00*v.votetypeid-5) over (partition by p.id order by v.CreationDate) from posts p join votes v on p.id = v.PostId where p.ParentID = 398871 and p.PostTypeId = 2 and v.votetypeid in (2,3)