I need to return the sum of fields grouped by accountid. I only want to see the results where the resulting sum is not equal to 0.
The query below works except I get a bunch of rows with a value of 0 which I do not want. What am I missing? Basic SQL but I am stuck.
Select Distinct
ledger.accountid,
Round(Sum(ledger.amount), 2) As BalanceDue
From
ledger
Where
ledger.glaccountid = 1
Group By
ledger.accountid
Open in new window