Score by tags last month

1

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

select top(100)

  Tags.TagName, 
  sum(q.Score) [Questions Score], 
  sum(a.Score) [Answers Score],
  sum(q.Score)+sum(a.Score) [Total]

-- q.Tags, q.Id, q.Score, a.Id, a.Score
from Posts q
left join Posts a on a.ParentId = q.Id
left join PostTags on PostTags.PostId = q.Id
left join Tags on Tags.id = PostTags.TagId
where Tags.TagName in ('##Tag1##','##Tag2##','##Tag3##')
and q.DeletionDate is  null
and a.DeletionDate is  null
and q.CreationDate >= DATEADD(month, -1, DATEADD(month, DATEDIFF(month, 0, CURRENT_TIMESTAMP), 0))
group by Tags.TagName
order by Total asc

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results