Q&A for SharePoint enthusiasts
-- WITH SuggEds AS ( SELECT se.OwnerUserId as [User Link], u.Reputation as EditorRep, up.Id as [User Link], up.Reputation as PosterRep, (up.Reputation + u.Reputation) as CombinedRep, p.Id as [Post Link], p.PostTypeId, se.*, p.* FROM SuggestedEdits se LEFT JOIN Posts p ON p.Id = se.PostId LEFT JOIN Users u ON (u.Id = se.OwnerUserId) LEFT JOIN Users up ON (up.Id = p.OwnerUserId) WHERE se.ApprovalDate IS NULL AND se.RejectionDate IS NULL AND PostTypeId in (1, 2) -- )