SELECT account, SUM(amount) as total FROM txn GROUP BY account HAVING total <> 0;