Histogram of up/downvotes after question creation


Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS

Q&A for administrators, end users, developers and designers for Craft CMS

select top 100 datediff(minute, q.CreationDate, v.CreationDate), v.VoteTypeId, q.Id
from Posts q inner join Votes v on q.Id = v.PostId
where q.PostTypeId = 1 -- questions
 and q.ClosedDate is null -- not-closed
 and (v.VoteTypeId = 2 or v.VoteTypeId = 3)
 and datediff(hour, q.CreationDate, v.CreationDate) >= 0
order by q.Id, datediff(hour, q.CreationDate, v.CreationDate)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results