Relationship between views and votes

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

select t.views, avg(t.votes)
from (
select max(p.viewcount) as views,
sum(case when v.votetypeid in (2,3) then 1 else 0 end) as votes
from posts p
join votes v on v.postid = p.id
where p.PostTypeId = 1
group by p.id
) as t
group by t.views;

Enter Parameters

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