Q&A for Drupal developers and administrators
SELECT count( DISTINCT p.Id) FROM Posts p INNER JOIN PostHistory ph ON p.Id = ph.PostId WHERE ph.PostHistoryTypeId IN (4,5) AND ph.UserID = ##UserID## AND DATEADD(MONTH, -6, ph.CreationDate) > ALL ( SELECT pph.CreationDate FROM PostHistory pph WHERE ( ph.PostID = pph.PostID AND ph.CreationDate > pph.CreationDate ) ) AND p.OwnerUserId != ##UserID##