Query editor
with token_addresses as (select address as address, symbol, name, type, price, 'ethereum' as blockchainfrom dune.ondo_team.result_ondo_assetsunion allselect address_bnb as address, symbol, name, type, price, 'bnb' as blockchainfrom dune.ondo_team.result_ondo_assetsunion allselect address_hype as address, symbol, name, type, price, 'hyperevm' as blockchainfrom dune.ondo_team.result_ondo_assetswhere address_hype is not null),chains as (SELECT addressFROM UNNEST(split('{{chains}}', ',')) AS t(address)),data as (select block_date, trader,symbol, amount_usd, tx_hash, project , blockchainfrom dune.ondo_team.result_dex_ondowhere blockchain in (select * from chains)),symbol_daily as (select block_date as day, symbol, count(tx_hash) as tradesfrom datagroup by 1,2),daily_totals as (select block_date as day, count(tx_hash) as daily_total_tradesfrom datagroup by 1),daily_totals_with_cum AS (SELECTday,daily_total_trades ,SUM(daily_total_trades ) OVER (ORDER BY day) AS cumulative_tradesfrom daily_totals),final as (select s.day, symbol, trades, daily_total_trades, cumulative_tradesfrom symbol_daily sleft join daily_totals_with_cum don s.day = d.dayorder by 1 desc)select *from finalwhere day >= date '2025-09-02'order by 1 desc