Modified Sam's query to test Google Charts embedding
Q&A about the site for people studying math at any level and professionals in related fields
-- How many upvotes do I have for each tag? -- how long before I get tag badges? DECLARE @UserId int = ##UserId## SELECT TOP 5 TagName, COUNT(*) AS UpVotes INTO #orig FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id and VoteTypeId = 2 WHERE Posts.OwnerUserId = @UserId GROUP BY TagName ORDER BY UpVotes DESC DECLARE @TagList varchar(8000) SELECT @TagList = COALESCE(@TagList + '%7c', '') + TagName FROM #orig DECLARE @VotesList varchar(8000) SELECT @VotesList = COALESCE(@VotesList + ',', '') + CAST(UpVotes AS varchar(100)) FROM #orig SELECT TagName, UpVotes, 'http://chart.apis.google.com/chart?cht=p3&chco=0000FF,00FF00&chd=t:'+@VotesList+'&chs=450x200&chl='+@TagList+'|Chart' [Chart Link] FROM #orig