short tag names that exist both with and without a final S

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy Meta

Q&A about the site for science fiction and fantasy enthusiasts

SELECT
  t1.Count AS [Count 1],
  'site://tags/' + t1.TagName + '|' + t1.TagName AS [Tag 1],
  t2.Count AS [Count 2],
  'site://tags/' + t2.TagName + '|' + t2.TagName AS [Tag 2]
FROM Tags t1, Tags t2
WHERE
  t2.TagName = t1.TagName + 's' AND
  Len(t1.TagName) <= 3
ORDER BY CASE WHEN t2.Count > t1.Count THEN t2.Count ELSE t1.Count END DESC,
         CASE WHEN t2.Count > t1.Count THEN t1.Count ELSE t2.Count END DESC,
         t1.TagName ASC

Enter Parameters

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