Q&A for science fiction and fantasy enthusiasts
SELECT TOP 50 TagName, COUNT(*) AS UpVotes, Posts.OwnerUserId as OwnerUserId, number = ROW_NUMBER() OVER (ORDER BY TagName) 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 Tags.TagName = 'maven' GROUP BY TagName, OwnerUserId ORDER BY UpVotes DESC