Dup Questions


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow en español

Preguntas y respuestas para programadores y profesionales de la informática

SELECT top 1
  questions.Id AS QuestionId,
  Posts questions
  LEFT JOIN Posts accepted ON accepted.Id = questions.AcceptedAnswerId
  LEFT JOIN Posts answers ON answers.ParentId = questions.Id
  LEFT JOIN PostHistory history ON history.PostId = questions.Id
    history.PostHistoryTypeId = 10
  ) AND (
    history.Text LIKE '{"OriginalQuestionIds":%'
  ) AND (
      answers.Id IS NULL
    ) OR (
      answers.Id IN (
        SELECT TOP 1 p.Id
        FROM Posts p
        WHERE p.ParentId = questions.Id
        ORDER BY p.Score DESC
ORDER BY questions.Id

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results