Hi
I have this query:
`SELECT SUM(`KN`) + SUM((COALESCE(`EUR`, 0)))*7.5 FROM log WHERE `KN` IS NOT NULL and `EUR` IS NOT NULL`
And it retunrs 0
SUM(EUR
)* 7.5 should be zero but SUM(KN
) is 60.
I am not shure what I am doing wrong here, I want to add numbers and avoid counting NULL so where is null to set 0 that I can add values
SELECT (SUM(EUR)* 7.5) FROM log WHERE EUR IS NOT NULL
returns 0
andSELECT SUM(
KN) FROM log WHERE KN IS NOT NULL
returns 60
Thanks