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/
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;