Answered question closed by himself

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском Meta

Вопросы и ответы о сайте для программистов

SELECT MAX(Id) AS CloseEventId, PostId
FROM PostHistory
WHERE
  PostHistoryTypeId = 10
  AND
  PostId IN (
    SELECT Id
    FROM Posts
    WHERE ClosedDate IS NOT NULL
  )
GROUP BY PostId

Enter Parameters

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