sum of records using where clause sql code example Example: sum of records using where clause sql SUM(CASE WHEN ValueDate > @startMonthDate THEN cash ELSE 0 END)