Views rolling 12 months

0

Please login or register to vote for this query.

(click on this box to dismiss)

Aviation

Q&A for aircraft pilots, mechanics, and enthusiasts

DECLARE @Date datetime = '2019-07-01'

DECLARE @UserId int = 158668

SELECT SUM(Q.ViewCount) as Views
FROM Posts AS A
  INNER JOIN PostTags ON A.ParentId = PostTags.PostId
  INNER JOIN Posts AS Q ON A.ParentId = Q.Id
  INNER JOIN Tags ON PostTags.TagId = Tags.id
WHERE
  A.OwnerUserId = @UserId
  AND TagName = 'amazon-web-services'
  AND A.CreationDate > @Date

Enter Parameters

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