Query editor
with days as (with time_seq as (SELECTsequence(cast('2025-01-01' as timestamp), date_trunc('day', cast(now() as timestamp)), interval '1' day) as time)SELECTtimes.timeFROM time_seqLEFT JOIN unnest(time) as times(time) on true--where times.time > DATE_TRUNC('day', NOW()) - INTERVAL '3' day),eth_in as (selectdate_trunc('day',evt_block_time) as day,sum(value)/1e18 as eth_infrom erc20_abstract.evt_transferwhere "to" in (select address from query_4635107)and contract_address = 0x000000000000000000000000000000000000800agroup by 1),eth_out as (selectdate_trunc('day',evt_block_time) as day,sum(value)/1e18 as eth_outfrom erc20_abstract.evt_transferwhere "from" in (select address from query_4635107)and contract_address = 0x000000000000000000000000000000000000800agroup by 1),final as (selectd.time,i.eth_in - o.eth_out as eth_bridgefrom days dleft join eth_in ion d.time = i.dayleft join eth_out oon d.time = o.day)selecttime as day,eth_bridge,sum(eth_bridge) over (order by time) as cumulativefrom finalorder by 1 desc