Questions that have a single tag

0

Please login or register to vote for this query.

(click on this box to dismiss)

Statistical Analysis

Q&A for people interested in statistics, machine learning, data analysis, data mining, and data visualization

-- This identifies questions with a single tag
-- and counts them up


WITH TagNames AS (
  SELECT Id, TagName
  FROM Tags
  )
, TagCount AS (
  SELECT COUNT(*) AS TagN, MIN(TagId) AS TagId, PostId
  FROM PostTags
  GROUP BY PostId
  )
, SingleTagCounts AS (
  SELECT COUNT(*) AS SingleCount, TagId
  FROM TagCount
  WHERE TagN = 1
  GROUP BY TagId
  )
SELECT TagNames.TagName, SingleTagCounts.SingleCount, TagNames.Id
FROM SingleTagCounts LEFT JOIN TagNames ON SingleTagCounts.TagId = TagNames.Id
ORDER BY SingleTagCounts.SingleCount DESC

Enter Parameters

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