You must use is null(or is not null) to filter null values.
select amount, distributorid
from paymants
where amount is not null
If you need all records with a zero sum with a different value (for example, -1), you can use isnullor coalesce, as shown below.
select coalesce(amount,-1) amount, distributorid
from paymants
Or, if you only need the number of null entries, you could do:
select amount, distributorid
from paymants
where amount is null
source
share