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.ParentId as [Post Link] ,p.Id ,datediff(day, p.CreationDate, GETDATE()) as [Days Old] ,count(*) as voteCount from Posts p inner join Votes v on v.PostId = p.Id and v.VoteTypeId = 2 where p.OwnerUserId = @userId and datediff(day, p.CreationDate, GETDATE()) >= 60 group by p.ParentId ,p.Id ,datediff(day, p.CreationDate, GETDATE()) having count(*) <= 4 and count(*) > 2 order by count(*) desc ,datediff(day, p.CreationDate, GETDATE()) desc