ID amount account number(varchar)
5105 0.70 23423423
5105 0.0 null
5105 0.0 null
5104 0.0 null
5104 0.0 null
5104 0.0 null
5106 0.0 32132111
5106 0.0 null
I want to get the distinct id for which all of its amount value is 0.0 and account number is null . basicly from this table i want the result as 5104. Can anyone please help i am new to SQL.