โหวตทั้งหมดโดยแท็กสำหรับผู้ใช้ ไม่จำเป็นต้องใช้ตารางทั้งหมด
All Votes by Tag for a User.It is not neccessary to use all the tables.
 SuggestedEditVotes:  Id [ number]  SuggestedEditId [ number]  UserId [ number]  VoteTypeId [ number]  CreationDate [ time]  TargetUserId [ number]  TargetRepChange [ number] 
WITH tagBadge AS (SELECT Name, COUNT(Id) AS badge_count FROM Badges GROUP BY Name), metrics AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(Tags.Id) DESC) AS rank, TagName, COUNT(Tags.Id) AS UpVotes, badge_count 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 LEFT JOIN tagBadge ON Tags.TagName = tagBadge.Name WHERE Posts.CommunityOwnedDate IS NULL AND Posts.OwnerUserId = 193 GROUP BY TagName, badge_count) SELECT rank, TagName, upvotes, badge_count, CAST(badge_count AS FLOAT(10, 2)) / CAST(upvotes AS FLOAT(10, 2)) AS badgesperupvote FROM metrics