Query editor
with index as (select distinctday,contract_address,symbol,pricefrom dune.rumpel_protocol.result_rumpel_protocol_index),sells as (selectevt_tx_hash,date_trunc('day', evt_block_time) as day,contract_address,cast(value as double) as amountfrom erc20_ethereum.evt_transferwhere evt_block_time >= timestamp '2025-05-15 00:00:00'and "from" = 0x027d523cf78be66840b39576613ccdf9747ad581)selectdate_trunc('week', day) as week,sum(amount_usd) as amount_usd,sum(sum(amount_usd)) over (order by date_trunc('week', day)) as amount_usd_cumulative,avg(sum(amount_usd)) over (order by date_trunc('week', day) rows between 3 preceding and current row) as amount_usd_rolling_4,avg(sum(amount_usd)) over (order by date_trunc('week', day) rows between 3 preceding and current row) * 52 as amount_usd_annualisedfrom (select-- evt_tx_hash,index.day,index.contract_address,index.symbol,price,sum(amount) as amount,sum(price * amount) as amount_usdfrom indexleft join sellson index.day = sells.dayand index.contract_address = sells.contract_addresswhere amount > 0group by 1, 2, 3, 4)group by 1order by 1 desc