Most viewed questions in tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lifehacks

Q&A for people looking to bypass life's everyday problems with simple tricks

DECLARE @Tag VARCHAR(25) = '##Tag##'

SELECT TOP 10000
Questions.Id 
AS [Post Link],
Questions.Tags,
Questions.AnswerCount, 
Questions.ViewCount,
Questions.CreationDate

FROM Posts AS Questions
    INNER JOIN PostTags 
    ON PostTags.PostId = Questions.Id
    INNER JOIN Tags
    ON Tags.Id = PostTags.TagId
    
WHERE Tags.TagName = @Tag

---ORDER BY ViewCount DESC
ORDER BY CreationDate, ViewCount DESC;

Enter Parameters

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