Query editor
withtimeline as (select timestamp as tsfrom utils.hourswhere timestamp >= timestamp '2026-04-19 19:00')-- , aave_coll_swaps as (-- select-- tx_hash-- , block_time-- , date_trunc('hour', block_time) as block_hour-- , date_trunc('day', block_time) as block_date-- , bytearray_substring(topic1, 13, 20) as user-- , varbinary_to_uint256(bytearray_substring(data, 1, 32)) / 1e18 as aeth_amount-- , case-- when topic0 = 0x81825f55b55b697cb8436659260992fed2bb56f94be2d8ec9f907984869d5892 then varbinary_to_uint256(bytearray_substring(data, 33, 32)) / 1e18-- else 0-- end as awsteth_amount-- , case-- when topic0 = 0x8af8b28e01162286cfee3e91726ce09682af432e6e8c9cd49890cd37726225cd then varbinary_to_uint256(bytearray_substring(data, 33, 32)) / 1e18-- else 0-- end as aweeth_amount-- , varbinary_to_uint256(bytearray_substring(data, 65, 32)) / 1e18 as profit-- from ethereum.logs-- where block_time >= timestamp '2026-04-19'-- and contract_address = 0x4f8f03caD7512E4F6d1050FB9b2F8b91aE4bC901-- and topic0 in (-- 0x81825f55b55b697cb8436659260992fed2bb56f94be2d8ec9f907984869d5892 -- SwapWstETH-- , 0x8af8b28e01162286cfee3e91726ce09682af432e6e8c9cd49890cd37726225cd -- SwapWeETH-- )-- )-- select-- t.ts-- , s.aeth_amount-- , s.awsteth_amount-- , s.aweeth_amount-- , s.swaps_cnt-- , sum(coalesce(aeth_amount, 0)) over (order by t.ts asc) as cum_aeth_amount-- , sum(coalesce(awsteth_amount, 0)) over (order by t.ts asc) as cum_awsteth_amount-- , sum(coalesce(aweeth_amount, 0)) over (order by t.ts asc) as cum_aweeth_amount-- , sum(coalesce(profit, 0)) over (order by t.ts asc) as cum_profit-- , sum(coalesce(swaps_cnt, 0)) over (order by t.ts asc) as cum_swaps_cnt-- from timeline as t-- left join (-- select-- block_hour as ts-- , sum(aeth_amount) as aeth_amount-- , sum(awsteth_amount) as awsteth_amount-- , sum(aweeth_amount) as aweeth_amount-- , sum(profit) as profit-- , count(*) as swaps_cnt-- from aave_coll_swaps-- group by 1 ) as s-- on t.ts = s.ts-- order by t.ts desc, aave_coll_swaps_ethereum as (