Votes per post

0

Please login or register to vote for this query.

(click on this box to dismiss)

Tridion

Q&A for Tridion developers and administrators

select 
  cast(Count(distinct Votes.Id) as float) / Count(distinct Posts.Id) as votes_per_post
from
  Votes
    inner join
  Posts
    on
  Posts.Id = Votes.PostId
where
  Votes.VoteTypeId = 2
    or
  Votes.VoteTypeId = 3
group by DatePart(mm, Posts.CreationDate), DatePart(yy, Posts.CreationDate)
order by DatePart(yy, Posts.CreationDate), DatePart(mm, Posts.CreationDate)

Enter Parameters

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