Synonym suggestions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Find tags that only differ by hyphenation, and present the synonym page link for that tag. Initiated by: http://meta.stackoverflow.com/questions/103168/ Original query by: Michael Mrozek, http://data.stackexchange.com/stackoverflow/q/109920/

Vegetarianism

Q&A for those committed to a vegan or vegetarian lifestyle and anyone interested in learning more

SELECT
  'http://stackoverflow.com/tags/'+a.Tagname+'/synonyms' AS [Tag Link],
  a.Count,
  b.Tagname AS Synonym,
  b.Count AS SynonymCount
FROM Tags AS a, Tags AS b
WHERE a.Id < b.Id
AND REPLACE(a.TagName, '-', '') = REPLACE(b.TagName, '-', '')
UNION SELECT
  'http://stackoverflow.com/tags/'+b.Tagname+'/synonyms' AS [Tag Link],
  b.Count,
  a.Tagname AS Synonym,
  a.Count AS SynonymCount
FROM Tags AS a, Tags AS b
WHERE a.Id < b.Id
AND REPLACE(a.TagName, '-', '') = REPLACE(b.TagName, '-', '')
ORDER BY Count DESC;

Enter Parameters

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