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

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

DECLARE @w40 datetime = '2013-09-30 00:00:00.000'
DECLARE @w41 datetime = '2013-10-07 00:00:00.000'
DECLARE @w42 datetime = '2013-10-14 00:00:00.000'
DECLARE @w43 datetime = '2013-10-21 00:00:00.000'
DECLARE @w44 datetime = '2013-10-28 00:00:00.000'
DECLARE @w45 datetime = '2013-11-04 00:00:00.000'
DECLARE @w46 datetime = '2013-11-11 00:00:00.000'
DECLARE @w47 datetime = '2013-11-18 00:00:00.000'
DECLARE @w48 datetime = '2013-11-25 00:00:00.000'
DECLARE @w49 datetime = '2013-12-02 00:00:00.000'
DECLARE @w50 datetime = '2013-12-09 00:00:00.000'
DECLARE @w51 datetime = '2013-12-16 00:00:00.000'
DECLARE @w52 datetime = '2013-12-23 00:00:00.000'
DECLARE @w53 datetime = '2013-12-30 00:00:00.000'
DECLARE @GOstrowskyId int = 2831404
DECLARE @DCherubiniId int = 2903653
DECLARE @UserId int = @GOstrowskyId
DECLARE @endw51 datetime = '2013-12-21 00:00:00.000'

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
WHERE (p.OwnerUserId = @GostrowskyId or p.OwnerUserId = @DCherubiniId) 
  AND p.PostTypeId = 2
  AND t.TagName IN ('wpf', 'prism', 'prism-4', 'prism-2')
  AND p.CreationDate >= @w40
  AND p.CreationDate < @w53
GROUP BY p.Id, p.CreationDate, p.Score, p.CommentCount
ORDER BY Score desc

Enter Parameters

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