Questions with one tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Find all open questions that have exactly one particular tag of your choosing — and no others

English

Q&A for linguists, etymologists, and serious English language enthusiasts

with singletons as (
  select PostId from PostTags
    group by PostId
    having count(PostTags.TagId) = 1
)

select 
  Id, Id as [Post Link], CreationDate as 'When', 
  Score, AnswerCount as 'Answers', ViewCount as 'Views'
from Posts inner join singletons on singletons.postid = posts.id
where
  posts.postTypeId = 1     and  -- post is a question
  posts.closeddate is null and  -- not closed
  posts.Tags LIKE '<##tags##>' OR Tags LIKE 'é##tags##à'
order by Posts.id

Enter Parameters

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