Q&A about the site for Drupal developers and administrators
DECLARE @StartDate DATETIME = '2024-05-01'; DECLARE @EndDate DATETIME = '2024-06-05'; SELECT p.Id AS [PostId], p.Body AS [CurrentBody], ph.Text AS [EditedBody], p.OwnerUserId AS [UserId], u.DisplayName AS [UserName], u.Reputation AS [UserReputation], p.LastEditDate AS [LastEditDate], p.CreationDate AS [CreationDate], ph.CreationDate AS [EditDate] FROM Posts p INNER JOIN PostHistory ph ON p.Id = ph.PostId INNER JOIN Users u ON p.OwnerUserId = u.Id WHERE ph.PostHistoryTypeId = 5 -- 5 indicates a body edit for an answer AND ph.Text LIKE '%OpenAI%' AND ph.CreationDate BETWEEN @StartDate AND @EndDate ORDER BY p.LastEditDate DESC;