instruction: How many upvotes does my username have for each tag?. how long before I get tag badges?
response: SELECT TagName, COUNT(*) AS UpVotes 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 INNER JOIN Users ON Users.AccountId = Posts.OwnerUserId WHERE Users.DisplayName = @DisplayName GROUP BY TagName ORDER BY UpVotes DESC