Q&A about the site for expert genealogists and people interested in genealogy or family history
SELECT SourceTagName, count(distinct TargetTagName) as AliasCount from TagSynonyms group by SourceTagName /* Tags.TagName , AVG(Score) AS 'Average Score' , AVG(ViewCount) AS 'Average View Count' FROM Posts INNER JOIN PostTags ON Posts.Id=PostTags.PostId LEFT JOIN Tags ON PostTags.TagId = Tags.Id WHERE PostTypeId = 1 -- question AND Tags.TagName IN ( @TagName1 , @TagName2 ) GROUP BY Tags.TagName */