Query editor
withdep as (SELECT"from" as address,sum(value/1e6) as amountFROM erc20_ethereum.evt_transferWHERE to = 0x122a88918c9E717D66d421FCA7fe61496dCf9325GROUP BY 1),withd as (SELECT"to" as address,-sum(value/1e6) as amountFROM erc20_ethereum.evt_transferWHERE "from" = 0x122a88918c9E717D66d421FCA7fe61496dCf9325GROUP BY 1),agg as (select * FROM depUNION ALLSELECT * FROM withd)SELECTaddress,sum(amount) as remFROM aggGROUP BY 1