n1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Reverse Engineering Meta

Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation

select p.id as [Post Link]
     , min(score) score
     , sum(case when votetypeid = 2 then 1 else 0 end) as up
     , sum(case when votetypeid = 3 then 1 else 0 end) as down
from posts p
inner join votes v on v.postid = p.id 
where p.id = 10958092
and posttypeid = 2 -- answers
and v.votetypeid in (2,3)
group by p.id
order by score , 3,4

Enter Parameters

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