Sum value multi column and column is null value sql server

untitled3

SELECT user_Id, UserName, Date, [Add New], Match, Insufficient, [Delete], SUM(COALESCE ([Add New], 0)) + COALESCE (Match, 0) + COALESCE (Insufficient, 0) + COALESCE ([Delete], 0) AS [Item Total]
FROM dbo.View_TargetByStatus
GROUP BY user_Id, UserName, Date, [Add New], Match, Insufficient, [Delete]

untitled3

Leave a comment