I tried to make this accept the tag as a parameter but I kepy getting an error.
Q&A for pro webmasters
-- Whats the age demographic per tag? -- I tried to make this accept the tag as a -- parameter but I kepy getting an error. --DECLARE @TagParam varchar = ##TagParam## SELECT TagName, count(TagName) as TagsPerAge, Age FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Users ON Users.id = Posts.OwnerUserId WHERE TagName = 'php' AND age > 0 GROUP BY Age, TagName ORDER BY TagsPerAge DESC