Query editor
with eth_transfer_raw as (select block_time, "from" as address, (-1) * cast(value as decimal(38, 0)) as amount, 'send' as transfer_typefrom ethereum.traceswhere (call_type is null or call_type not in ('delegatecall', 'callcode', 'staticcall'))and success = trueand value > uint256 '0'and "from" = {{wallet_address}}union allselect block_time, "to" as address, cast(value as decimal(38, 0)) as amount, 'receive' as transfer_typefrom ethereum.traceswhere (call_type is null or call_type not in ('delegatecall', 'callcode', 'staticcall'))and success = trueand value > uint256 '0'and "to" = {{wallet_address}}union allselect block_time, "from" as address, (-1) * cast(gas_price as double) * gas_used as amount, 'gas fee' as transfer_typefrom ethereum.transactionswhere success = trueand "from" = {{wallet_address}}),eth_balance_daily as (select date_trunc('day', block_time) as block_date,sum(amount) as balance_amountfrom eth_transfer_rawgroup by 1order by 1),eth_transfer_daily as (select date_trunc('day', block_time) as block_date,transfer_type,sum(amount) as transfer_amountfrom eth_transfer_rawgroup by 1, 2order by 1, 2)select block_date,transfer_type,transfer_amount / 1e18 as transfer_amountfrom eth_transfer_dailyorder by 1, 2