Mining for evidence of Jon Skeet "bias".

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology

Q&A for enthusiasts and scholars of mythology and folklore

WITH rankScores AS (
Select TOP 10000 p.ParentId, p.Id, p.OwnerUserId, parent.AcceptedAnswerId, RANK() OVER (PARTITION BY p.ParentId ORDER BY p.Score DESC) AS Rank
  FROM Posts p INNER JOIN Posts parent ON p.ParentId = parent.Id
  WHERE p.PostTypeId = 2 
)
SELECT SUM(CASE WHEN Rank = 1 AND AcceptedAnswerId IS NOT NULL AND AcceptedAnswerId <> Id THEN 1 ELSE 0 END) AS Controversial, Count(*) AS AnswerCount 
FROM rankScores WHERE OwnerUserId = 22656
UNION 
SELECT SUM(CASE WHEN Rank = 1 AND AcceptedAnswerId IS NOT NULL AND AcceptedAnswerId <> Id THEN 1 ELSE 0 END) AS Controversial, Count(*) AS AnswerCount 
FROM rankScores

Enter Parameters

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