SELECT TOP 30 pq.Id as question_id, pq.AcceptedAnswerId a...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Interpersonal Skills

Q&A for people looking to improve their interpersonal communication skills

SELECT TOP 30
  pq.Id as question_id,
  pq.AcceptedAnswerId as accepted_answer_id,
  pa.Id as answer_id,
  pa2.Score as accepted_score
FROM posts pq

LEFT JOIN 
  (
    SELECT * 
    FROM posts pa 
    WHERE pa.ParentId IS NOT NULL
  ) pa on pa.ParentId = pq.Id

LEFT JOIN 
  (
    SELECT * 
    FROM posts pa 
    WHERE pa.ParentId IS NOT NULL
  ) pa2 on pa.Id = pq.AcceptedAnswerId

WHERE pq.ParentId IS NULL

Enter Parameters

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