Find lonely tags

0

Please login or register to vote for this query.

(click on this box to dismiss)

Unix and Linux

Q&A for users of Linux, FreeBSD and other Un*x-like operating systems

-- declare @tagName varchar(25) = ##TagName:string##
SELECT SingleTagQs.Id AS [Post Link]
FROM ( ( SELECT Posts.Id ,
                COUNT( PostTags.TagId ) AS TagCount
         FROM Posts
         JOIN PostTags
         ON Posts.Id = PostTags.PostId
         GROUP BY Posts.Id
         HAVING COUNT( PostTags.TagId ) = 1 ) AS SingleTagQs
       JOIN PostTags
       ON SingleTagQs.Id = PostTags.PostId )
JOIN Tags
ON PostTags.TagId = Tags.Id
WHERE Tags.TagName = 'debian' or
Tags.TagName = 'ubuntu' or 
Tags.TagName = 'centos' or 
Tags.TagName = 'kali-linux' or 
Tags.TagName = 'linux-mint' or 
Tags.TagName = 'fedora' or 
Tags.TagName = 'arch-linux' or 
Tags.TagName = 'rhel'
-- or Tags.TagName = '

Enter Parameters

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