track voting for multiple answers to specific question

0

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

with a as (select v.CreationDate time , 
       cast(p.id as char) post,
       --(5-2.00*v.votetypeid) vote,
       sum(5-2.00*v.votetypeid)
          over (partition by p.id order by p.id, v.CreationDate
                ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) score
from posts p join votes v 
on p.id = v.PostId
where p.ParentID = ##ParentQuestion:int?398871## and p.PostTypeId = 2 and v.votetypeid in (2,3)
)

select time, post, score
--select time, post, power(abs(score),0.5)
from a 
order by post, time;

Enter Parameters

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