Query editor
with incoming as (select sum(value) / 1e18 as value, "to" as accountfrom erc20_base.evt_Transferwhere contract_address = 0x78a087d713be963bf307b18f2ff8122ef9a63ae9group by 2), outgoing as (select sum(value) / 1e18 as value, "from" as accountfrom erc20_base.evt_Transferwhere contract_address = 0x78a087d713be963bf307b18f2ff8122ef9a63ae9group by 2), total as (selectincoming.account,(incoming.value - coalesce(outgoing.value, 0)) as balancefromincomingleft joinoutgoing on (incoming.account = outgoing.account))-- Adding total ARX held by all wallets as the first rowselect 0x0000000000000000000000000000000000000000 as account, sum(balance) as balance from totalwherebalance > 0 andaccount not in (0xe80b4f755417fb4baf4dbd23c029db3f62786523, 0x64fcfa940f286af1261107f993189379e8d3ae1c, 0x86dbd5baae91ac576e8e5197eb2497603d0056ea, 0x2b0a43dccbd7d42c18f6a83f86d1a19fa58d541a)UNION ALL-- Individual balancesselect account, balance from totalwherebalance > 0 andaccount not in (0xe80b4f755417fb4baf4dbd23c029db3f62786523, 0x64fcfa940f286af1261107f993189379e8d3ae1c, 0x86dbd5baae91ac576e8e5197eb2497603d0056ea, 0x2b0a43dccbd7d42c18f6a83f86d1a19fa58d541a)order by balance desc;