instruction: Find users who got Strunk & White and edited with more than 40 edits close to that date.
response: SELECT UserId, MAX(ph_count) FROM (SELECT b.UserId, DATEDIFF(day, b.Date, CreationDate) AS days, COUNT(DATEDIFF(day, b.Date, CreationDate)) AS ph_count FROM Badges AS b INNER JOIN PostHistory AS ph ON (b.Name = 'Strunk & White' AND b.UserId = ph.UserId AND DATEDIFF(day, b.Date, CreationDate) BETWEEN -3 AND 3) INNER JOIN Posts AS p ON (p.Id = ph.PostId AND p.OwnerUserId != ph.UserId AND ph.PostHistoryTypeId IN (4, 5)) GROUP BY b.UserId, DATEDIFF(day, b.Date, CreationDate)) AS innerTable GROUP BY UserId HAVING MAX(ph_count) >= 40