How can I do to sum the result of this queries using postgresql?:
SELECT SUM(value) FROM credit_balance
SELECT SUM(value) FROM debit_balance
I have tried this but it doesn't work:
SELECT SUM(SELECT SUM(value) FROM credit_balance UNION ALL SELECT SUM(value) FROM debit_balance)