Non-tag badge pairs which no one keeps

1

Please login or register to vote for this query.

(click on this box to dismiss)

It only can see the badges which were given at least once. SO has no such pair, it is not a bug.

Cognitive Sciences Meta

Q&A about the site for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry

WITH Raw AS (
  SELECT UserId, Name
  FROM Badges
  WHERE TagBased = 0
  GROUP BY UserId, Name
),
Raw3 AS (
  SELECT Name
  FROM Raw
  GROUP BY Name
)
SELECT A.Name AS BadgeA, B.Name AS BadgeB
FROM Raw3 A, Raw3 B
WHERE
  A.Name < B.Name

EXCEPT

SELECT A.Name AS BadgeA, B.Name AS BadgeB
FROM Raw A, Raw B
WHERE
  A.UserId = B.UserId
  AND
  A.Name < B.Name
GROUP BY A.Name, B.Name

ORDER BY BadgeA, BadgeB

Enter Parameters

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