Query editor
-- web3datadegens address: 0xa0cA98Ac421CA3B7874f39021A1372aF18010682with txs_in as (selectsum(value / pow(10,18)) as eth_infrom ethereum.traceswhere to = {{address}}and type = 'call'and (call_type not in ('delegatecall', 'staticcall', 'callcode') or call_type is null)),txs_out as (selectsum(value / pow(10,18)) as eth_outfrom ethereum.traceswhere "from" = {{address}}and type = 'call'and (call_type not in ('delegatecall', 'staticcall', 'callcode') or call_type is null)),gas_fees as (selectsum(gas_price_gwei*gas_used/pow(10,9)) as total_gasfrom gas.feeswhere blockchain = 'ethereum'and tx_sender = {{address}})select*, eth_in - COALESCE(eth_out, 0) - COALESCE(total_gas, 0) as balancefrom txs_inleft join txs_out on 1=1left join gas_fees on 1=1