Grabs all questions asked by users who no longer exist and selects the ones where the highest voted answer is NOT the accepted answer. I'm sure this query could be optimized.
Q&A for professional and enthusiast programmers
-- Calculate the highest voted answer and accepted answer for every question.
WITH questions AS (
accepted.Score AS AcceptedScore,
ParentId = question.Id AND
question.AcceptedAnswerId != Id
) AS HighestScore
FROM Posts question, Posts accepted
question.AcceptedAnswerId = accepted.Id AND
question.PostTypeId = 1 AND
question.OwnerUserId IS NULL
-- Select only the questions containing answers voted higher than the accepted answer.
Id AS [Post Link],
ViewCount AS [View Count],
AcceptedScore AS [Score of Accepted Answer],
HighestScore AS [Score of Highest Voted Answer]
HighestScore > AcceptedScore AND
ViewCount > 1000