SELECT TOP 5000 Users.Id as [User Link], QuestionCount, R...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Woodworking

Q&A for professional and amateur woodworkers

SELECT 
    TOP 5000
    Users.Id as [User Link],
    QuestionCount,
    Reputation,
    Age,
    Count(Posts.Id) AS Answers,
    CAST(AVG(CAST(Score AS float)) as numeric(6,2)) AS [Average Answer Score]
FROM
    Posts
  INNER JOIN
    Users ON Users.Id = OwnerUserId
    
   inner join (
  select
    OwnerUserId,
    count(Id) as QuestionCount
  from posts
  where PostTypeId = 1
  group by OwnerUserId
) as Q on Users.Id = Q.OwnerUserId

WHERE 
    PostTypeId = 2 and CommunityOwnedDate is null and ClosedDate is null
GROUP BY
    Users.Id, DisplayName, Reputation, QuestionCount, Age
ORDER BY
    QuestionCount DESC

Enter Parameters

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