Self-answered questions with scores

0

Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts Meta

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

SELECT
  q.Id as [Post Link],
  q.creationdate AS [Date posted],
  a.creationdate AS [Date answered], 
  (SELECT COUNT(*) FROM Votes WHERE VoteTypeId = 2 AND PostId = q.Id) AS [Question upvotes],
  (SELECT COUNT(*) FROM Votes WHERE VoteTypeId = 2 AND PostId = a.Id) AS [Answer upvotes]
FROM
  Posts q
INNER JOIN Posts a ON
  a.ParentId = q.Id
WHERE
  q.OwnerUserId = ##UserId## AND
  a.OwnerUserId = ##UserId##
ORDER BY
  q.creationdate DESC,
  q.score DESC

Enter Parameters

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