11

I want to get the list of questions which are only tagged with .

Currently I am getting the list of all questions tagged with + other tags in it.

For example, if there are two new questions with question Q1 () and question Q2 ( ), I want to get only question Q1, instead of both Q1 and Q2, which have the tag.

2

1 Answer 1

12

You can't do this in the Stack Overflow search facility - but you can create your own query in the data explorer to do the same thing if you really wished:

Here is one I created as an example for you

For those who cba with the link, here is the SQL:

DECLARE @tag nvarchar(250)

-- Choose which tag you want to search for here:
SET @tag = 'java'

SELECT TOP 10 Id AS [Post Link], Tags
FROM Posts
WHERE Tags = '<' + @tag + '>' AND PostTypeId = 1
ORDER BY LastActivityDate DESC
6
  • 1
    Excellent, this is what I am exactly looking for :) Commented Mar 31, 2016 at 10:52
  • 2
    Do know that you can use the magic column [Post Link] on posts.id to get the title and link in one go, as shown here
    – rene
    Commented Mar 31, 2016 at 12:18
  • 2
    @rene I haven't played with the magic columns yet, but that's a perfect example of when to use one! I'll update the query - cheers :) Commented Mar 31, 2016 at 12:20
  • Sorry, completely separate from the answer, what does this mean: "... those who cba with the link..."? Commented Mar 31, 2016 at 18:10
  • 1
    @MikeMcCaughan cba = "can't be arsed". Basically if people don't feel like following the link to see how the query works I posted the code to save them the effort. Just a couple less clicks :) Commented Mar 31, 2016 at 18:13
  • 2
    Thanks, I'm old, American, and lazy, so I cba to look up cba :) Commented Mar 31, 2016 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .