Query editor
withxdai_transfer_raw as (select"from" as address,(-1) * cast(value as double) as amountfromgnosis.traceswhere--call_type = 'call'--(call_type not in ('staticcall','delegatecall','callcode') or call_type IS null)(call_type not in ('staticcall','delegatecall','callcode') or call_type IS null )and success = trueand cast(value as double) > 0union allselect"to" as address,cast(value as double) as amountfromgnosis.traceswhere--call_type = 'call'(call_type not in ('staticcall','delegatecall','callcode') or call_type IS null )--and "type" in ('reward','suicide','create')and success = trueand cast(value as double) > 0union allselect"from" as address,sum((-1) * cast(gas_price as decimal) * cast(gas_used as decimal)) amountfromgnosis.transactionsgroup by1),xdai_balance as (selectaddress,sum(amount/1e18) as balancefromxdai_transfer_rawgroup by1order by2 desc)selectcase when balance > 1 then '+1'else '<1' end as size,count(address) as Users,sum(balance) as amountfromxdai_balancewhereaddress is not nulland address not in (0x0000000000000000000000000000000000000000, 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d, 0x7301cfa0e1756b71869e93d4e4dca5c7d0eb0aa6)