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, min(t.TagName)
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 (p.OwnerUserId = @GOstrowskyId or p.OwnerUserId = @DCherubiniId)
  AND t.TagName IN ('prism', 'prism-4', 'prism-2')
  AND p.CreationDate > @StartDate
  AND p.Score > 0
GROUP BY p.Id, p.CreationDate, p.Score, p.CommentCount
ORDER BY Score desc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results