SELECT TOP 50 q.* FROM posts q -- Get all posts INNER JOI...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Chess

Q&A for serious players and enthusiasts of chess

SELECT TOP 50 q.*
FROM posts q -- Get all posts
INNER JOIN posts a ON q.AcceptedAnswerId = a.Id -- Get accepted answer
  AND q.OwnerUserId = a.OwnerUserId -- Only get posts where user answered own question 
  AND a.PostTypeId = 2 -- Only get answers (??)
INNER JOIN users u ON u.Id = q.OwnerUserId -- get OP's user info
WHERE q.PostTypeId = 1 -- Only get questions (??)

Enter Parameters

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