Ratio of answer scores of meta users, compared to all answerers

1

Please login or register to vote for this query.

(click on this box to dismiss)

Counts only positively scored answers.

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

WITH HasMSOPost AS (
  SELECT OwnerUserId AS UserId
  FROM [StackOverflow.Meta].dbo.Posts
  WHERE
    OwnerUserId > 0
  GROUP BY OwnerUserId
)
SELECT
  SUM(SOA.Score) AS AllAnswers,
  SUM(CASE WHEN HasMSOPost.UserId IS NOT NULL THEN SOA.Score ELSE 0 END)
    AS HasMSOPost
FROM StackOverflow.dbo.Posts SOA
LEFT JOIN HasMSOPost ON SOA.OwnerUserId = HasMSOPost.UserId
WHERE
  SOA.OwnerUserId > 0
  AND
  SOA.PostTypeId = 2
  AND
  SOA.Score > 0

Enter Parameters

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