SO tagged and tag views (count)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla

Q&A for Joomla! administrators, users, developers and designers

DECLARE @total float
SELECT @total = Sum(Cast(ViewCount as bigint)) FROM Posts WHERE PostTypeId = 1

SELECT 
    Tags.Tagname AS Tag, 
    Count(*) AS Questions, 
    Sum(Cast(Posts.ViewCount as bigint)) AS Views,
    Sum(Posts.AnswerCount) AS Answers
FROM Posts 
  JOIN PostTags ON Posts.Id = PostTags.PostId
  JOIN Tags ON PostTags.TagId = Tags.Id
WHERE 
  Posts.PostTypeId = 1
  AND (TagName like 'azure%')
  AND Posts.CreationDate >= '2018-07-01'
  AND Posts.CreationDate < '2019-07-01'
GROUP BY Tags.Tagname
ORDER BY Tags.Tagname DESC

Enter Parameters

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