SELECT TOP 100 Users.Id as [User Link], max(Age) as Age, ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Islam Meta

Q&A about the site for Muslims, experts in Islam, and those interested in learning more about Islam

SELECT TOP 100
    Users.Id as [User Link],
    max(Age) as Age,
    max(Location) as Location,
    max(WebsiteUrl) as Website,
    max(Reputation) as Rep,
    Count(Answers.Id) as Answers,
    sum(Answers.Score) as Score,
    CAST(AVG(CAST(Answers.Score AS float)) as numeric(6,1)) as [Avg]
FROM Tags    
    JOIN PostTags ON PostTags.TagId = Tags.Id
    JOIN Posts ON Posts.Id = PostTags.PostId 
    JOIN Posts as Answers ON Answers.ParentId = Posts.Id
    JOIN Users ON Users.Id = Answers.OwnerUserId
WHERE    
    Tags.TagName = 'php'
GROUP BY 
    Users.Id, DisplayName
ORDER BY 
    sum(Answers.Score) DESC

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results