Query editor
with historical as (select day, sum(sum(amount)) over (order by day) as buffer from (select date_trunc('day',block_time) as day , 1*cast(value as double)/1e18 as amountfrom ethereum.traceswhere to in(0xae7ab96520de3a18e5e111b5eaab095312d7fe84,0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f,0x889edc2edab5f40e902b864ad4d7ade8e412f9b1)AND (LOWER(call_type) NOT IN ('delegatecall', 'callcode', 'staticcall') or call_type is null)AND success = trueUNION ALLselect date_trunc('day',block_time) as day, -1*cast(value as double)/1e18 as amountfrom ethereum.traceswhere "from" in (0xae7ab96520de3a18e5e111b5eaab095312d7fe84,0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f,0x889edc2edab5f40e902b864ad4d7ade8e412f9b1)AND (LOWER(call_type) NOT IN ('delegatecall', 'callcode', 'staticcall') or call_type is null)AND success = trueUNION ALLSELECT date_trunc('day',block_time) as day,(-1)*cast(gas_price as double)*cast(gas_used as double)/1e18 as amountFROM ethereum.transactionsWHERE "from" in (0xae7ab96520de3a18e5e111b5eaab095312d7fe84,0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f,0x889edc2edab5f40e902b864ad4d7ade8e412f9b1)UNION ALLSELECT date_trunc('day',block_time) as day,cast(amount as double)/1e9 as amountFROM ethereum.withdrawalsWHERE "address" in (0xae7ab96520de3a18e5e111b5eaab095312d7fe84,0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f,0xae7ab96520de3a18e5e111b5eaab095312d7fe84))agroup by 1order by 1 desc)select * from historicalwhere day>=date('2023-05-10')order by 1 desc