It would be appreciated explaining the internal functionality of SUM function in Oracle, when encountering null values: The result of
select sum(null)
This is incorrect: The sum of 0 + null + 1 + 2 is 3; select 0 + null + 1 + 2 total from dual;
Result is null! Similar statements give result null if any operand is null.