I have a query that takes data from 2 tables. It works, but the two SUMs return NULL if there are no values. How can I get zero instead?
SELECT SUM(g.field1),
SUM(g.field2),
c._id,
c.field_1,
c.field_3
FROM Table1 g
JOIN Tabel2 c
WHERE ( c.field_1 = g.field5 )