The most-viewed unanswered questions for a tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @TagLike NVARCHAR(25) = ##taglike:string##

select DISTINCT top 2000  q.Id as [Post Link],  q.ViewCount
  from Posts q
    INNER JOIN PostTags ON q.Id = PostTags.PostId
    INNER JOIN Tags ON PostTags.TagId = Tags.id
where (select count(*) from Posts a where a.ParentId = q.Id and a.Score > 0) = 0
and CommunityOwnedDate is null and ClosedDate is null and q.ParentId is null 
and AcceptedAnswerId is null
AND Tags.TagName LIKE '%' + @TagLike + '%'
ORDER BY q.ViewCount DESC

Enter Parameters

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