Real unsung heros - people with many answers AND high zero-score answer ratio

1

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers

Q&A for Drupal developers and administrators

WITH Raw AS (
  SELECT
    OwnerUserId AS [User Link],
    100.0 * COUNT(CASE WHEN Score = 0 THEN 1 END) / COUNT(*) AS ZeroPct,
    COUNT(*) AS AllCount
  FROM Posts
  WHERE
    OwnerUserId > 0
    AND
    PostTypeId = 2
  GROUP BY OwnerUserId
),
Raw2 AS (
  SELECT
    *,
    DENSE_RANK() OVER (ORDER BY AllCount DESC) AS ZeroRank,
    DENSE_RANK() OVER (ORDER BY ZeroPct DESC) AS AllRank
  FROM Raw
)
SELECT *, ZeroRank + AllRank AS Rank
FROM Raw2
ORDER BY Rank

Enter Parameters

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