Q&A about the site for operations research and analytics professionals, educators, and students
SELECT se.id as SuggestedId,102 RejectionReasonId, ROW_NUMBER() OVER (PARTITION BY se.OwnerUserId ORDER BY se.CreationDate) as preSuggEditCount FROM SuggestedEdits se where se.Id in ( select se.Id from SuggestedEdits se inner join reviewtasks rt on rt.suggestededitid = se.id inner join reviewtaskResults rtr on rtr.id = rt.CompletedByReviewTaskId left outer join ReviewRejectionReasons rrr on rrr.id = rtr.RejectionReasonId where rtr.ReviewTaskResultTypeId = 3 and se.Text is not NULL and rtr.RejectionReasonId = 102 and rejectiondate between cast('2017-01-01' as datetime) and cast('2019-01-01' as datetime) ) and se.OwnerUserId IS NOT NULL and se.OwnerUserId <> -1