Which of my answers received more votes than the accepted answer?

1

Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

WITH Utable AS
(
SELECT
Id AS AnswerId,
ParentId AS QuestionId,
Score AS Uscore
FROM Posts  
WHERE
  OwnerUserId = 7128934  
  AND Posts.PostTypeId = 2
  AND Posts.ParentId IN
    (SELECT Posts.Id FROM Posts WHERE Posts.AcceptedAnswerId IS NOT NULL)
),
OTable AS
(
SELECT Score AS Oscore,
ParentId AS Oqid,
AcceptedAnswerId AS Oaid
FROM Posts
WHERE Posts.ParentId IN (SELECT QuestionId FROM UTable)
AND Posts.Id IN (SELECT DISTINCT AcceptedAnswerId FROM Posts)
)
SELECT DISTINCT
Id AS [Post Link],
Utable.AnswerId,
OTable.OScore,
Utable.Uscore
FROM Posts
  INNER JOIN Utable ON Utable.QuestionId = Posts.Id
  INNER JOIN Otable ON Otable.Oqid = Posts.Id

Enter Parameters

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