Top Viewed Questions for Multiple Tag

1

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga Meta

Q&A about the site for anime and manga fans

SELECT TOP 1000 p.ViewCount * 1.0 / DATEDIFF(DD, p.CreationDate, GETDATE()) AS ViewsPerDay
, p.ViewCount AS TotalViews, p.Id AS [Post Link]
FROM dbo.Posts p
INNER JOIN dbo.PostTags pt ON p.Id = pt.PostId
INNER JOIN dbo.Tags t ON pt.TagId = t.Id
WHERE p.PostTypeId = 1 /* Questions */
AND t.TagName In (##Tagname1:string?sql-server##, ##TagName2:string?tdd##)
AND p.CreationDate < DATEADD(dd, -14, GETDATE())
ORDER BY p.ViewCount * 1.0 / DATEDIFF(DD, p.CreationDate, GETDATE()) DESC;

Enter Parameters

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