Polarized posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

with postVotes as (

select P.id as [Post Link]
    , ( select count(V1.id) 
        from Votes V1 
        where V1.postId = P.id
            and V1.voteTypeId = 2 --upvotes
    ) as upvotes
    , ( select count(V2.id) 
        from Votes V2 
        where V2.postId = P.id
            and V2.voteTypeId = 3 --downvotes
    ) as downvotes
    , P.viewCount
from Posts P

)

select * from postVotes
where upvotes > 9 and downvotes > 9

Enter Parameters

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