Query editor
-- address sender 0x2e7f82f3046ebfeba32fdb530455fba711dc4c62-- what affected the balanced, sort inflow and outflows by addresseswith inflow as (selectsum(cast(value as double)/1e18) as eth_sum_inFROMethereum.traces as tWHEREto = 0x2e7f82f3046ebfeba32fdb530455fba711dc4c62andtype = 'call'and(call_type NOT IN ('delegatecall','staticcall','callcode') OR call_type is null and cast(value as double)>0)),outflow as (selectsum(cast(value as double)/1e18) as eth_sum_outFROMethereum.traces as tWHERE"from" = 0x2e7f82f3046ebfeba32fdb530455fba711dc4c62andtype = 'call'and(call_type NOT IN ('delegatecall','staticcall','callcode') OR call_type is null )and cast(value as double)>0),gas_used as (select sum((gas_price*gas_used)/1e18) as sum_gas_spentfrom ethereum.transactions as etwhere to = 0x2e7f82f3046ebfeba32fdb530455fba711dc4c62 )SELECTeth_sum_in - coalesce(eth_sum_out,0) - coalesce(sum_gas_spent,0) as total_balance,eth_sum_in,eth_sum_out,sum_gas_spentfrom inflowleft join outflow on 1=1left join gas_used on 1=1