Query editor
with dex_all as (select *, 'Solana' as chain from dune.phantom.result_tokenized_equities_sol_dex union all select * from dune.phantom.result_tokenized_equities_rh_dex union all select * from dune.phantom.result_tokenized_equities_base_dex),xfer_all as (select *, 'Solana' as chain from dune.phantom.result_tokenized_equities_sol_xfer union all select * from dune.phantom.result_tokenized_equities_rh_xfer union all select * from dune.phantom.result_tokenized_equities_base_xfer),hold_all as (select *, 'Solana' as chain from dune.phantom.result_tokenized_equities_sol_holders union all select * from dune.phantom.result_tokenized_equities_rh_holders union all select * from dune.phantom.result_tokenized_equities_base_holders),price_all as (select *, 'Solana' as chain from dune.phantom.result_tokenized_equities_sol_price union all select * from dune.phantom.result_tokenized_equities_rh_price union all select * from dune.phantom.result_tokenized_equities_base_price),top as (select project from dex_all where lvl='project_day' group by 1 order by sum(volume_usd) desc limit 8)select block_date as day, case when project in (select project from top) then project else 'other' end as venue, sum(volume_usd) as volume_usdfrom dex_all where lvl='project_day' and block_date < current_date group by 1,2 order by 1