DECLARE @StartDate datetime = '2013-09-30 00:00:00.000' D...


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @StartDate datetime = '2013-09-30 00:00:00.000'
DECLARE @GOstrowskyId int = 2831404
DECLARE @DCherubiniId int = 2903653

SELECT p.Id as [Post Link], p.CreationDate, p.Score, p.CommentCount
FROM Posts p
INNER JOIN PostTags pt ON p.ParentId = pt.PostId
INNER JOIN Tags t ON pt.TagId = t.Id
INNER JOIN Posts q ON q.Id = p.ParentId
   p.PostTypeId = 2
  AND NOT EXISTS (Select * FRom Posts ans 
          where ans.ParentId = q.Id AND (ans.OwnerUserId = @GOstrowskyId 
          or ans.OwnerUserId = @DCherubiniId))
  AND t.TagName IN ('prism', 'prism-4', 'prism-2')
  AND q.CreationDate > @StartDate
GROUP BY p.Id, p.CreationDate, p.Score, p.CommentCount
ORDER BY P.Id desc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results