When you use:
select field1, nvl(sum(field2),0)
from table
group by field1

the nulls are in field2 and you are trying to sum them. If you want to sum the nulls as 0:
select field1, sum(nvl(field2,0))
from table
group by field1