SELECT t.Score, Avg(t.commentCount) AS [Average # of com...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity

Q&A for committed Christians, experts in Christianity and those interested in learning more

-- Enter Query Title
-- Enter Query Description

SELECT
  t.Score, Avg(t.commentCount) AS [Average # of comments]
FROM
  (SELECT
    COUNT(c.Id) AS commentCount,
    p.Score
  FROM
      Comments AS c
    JOIN 
      Posts AS p ON c.PostId=p.Id
  WHERE
    p.OwnerUserId = ##UserId##
  GROUP BY p.Score, p.Id
  ) AS t
GROUP BY Score

Enter Parameters

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