Top 5 tags users have answered

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla

Q&A for Joomla! administrators, users, developers and designers

SELECT TOP 5 Tags.tagname, Users.DisplayName, sum(Answers.Score) as Score
    
FROM Users
    JOIN Posts as Answers ON Answers.OwnerUserId = Users.Id
    JOIN Posts ON Posts.Id = Answers.ParentId
    JOIN PostTags ON PostTags.PostId = Posts.Id
    JOIN Tags ON Tags.Id = PostTags.TagId
WHERE
    Users.DisplayName = '##username##'
Group By
    Users.DisplayName, Tags.tagname
ORDER BY 
    sum(Answers.Score) DESC;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results