Wilson confidence rating for posts of a user


Please login or register to vote for this query.

(click on this box to dismiss)


Ask Ubuntu

Q&A for Ubuntu users and developers

select p.id
     , p.owneruserid
     , sum(case when v.votetypeid = 2 then 1 else 0 end) upvotes
     , sum(case when v.votetypeid = 3 then 1 else 0 end) downvotes
from posts p
inner join votes v on v.postid = p.id
where v.votetypeid in (2,3)
and p.owneruserid = 2157772
group by p.id
       , p.owneruserid

Enter Parameters

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