I want to write the ADA balance of my wallet to a console window using sql queries against the db-sync database.
How can I use sql statements to obtain the ADA balance of a given address by querying db-sync via postgresql? I tried querying the sum of the [value] of the utxo's of my wallet but seem to get inaccurate results acording to what my Eternl wallet says my balance is. Somehow I am misunderstanding what I should be summing etc.
There is no straightforward query for "wallet balance" in the interesting queries in the db-sync git repo.