Q&A about the site for those interested in the study of the fundamental nature of knowledge, reality, and existence
DECLARE @ed INT; SELECT @ed = u.Id FROM dbo.Users AS u WHERE u.DisplayName = 'Max Vernon' AND u.Reputation > 30000; SELECT COUNT_BIG(*) AS total, SUM(CASE WHEN p.LastEditDate IS NOT NULL THEN 1 ELSE 0 END) AS edited, SUM(CASE WHEN p.LastEditDate IS NULL THEN 1 ELSE 0 END) AS not_edited FROM dbo.Posts AS p WHERE p.OwnerUserId = @ed OPTION(RECOMPILE);