Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
DECLARE @ed INT; SELECT @ed = u.Id FROM dbo.Users AS u WHERE u.DisplayName = 'Paul White' 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);