declare @userId int = ##userId## select p.Title ,p.Id ,...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity

Q&A for committed Christians, experts in Christianity and those interested in learning more

-- Enter Query Title
-- Enter Query Description

declare @userId int = ##userId##

select
    p.Title
   ,p.Id
   ,count(*) as voteCount
from
    Posts p         
    inner join Votes v
        on v.PostId = p.Id
        and v.VoteTypeId = 2
where
    p.OwnerUserId = @userId
group by
    p.Title
   ,p.Id
having
    count(*) <= 4
    and count(*) > 2
   

Enter Parameters

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