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),d as (select chain, sum(volume_usd) vol, sum(trades) trades, count(distinct ticker) tickers from dex_all where lvl='ticker_30d' group by 1),x as (select chain, sum(transfer_usd) transfer_usd, sum(minted_usd) - sum(burned_usd) net_minted_30d_usd from xfer_all where lvl='issuer_30d' group by 1),p as (select chain, ticker, max_by(price_usd, trades_2d) as price_usd from price_all where trades_2d >= 5 group by 1, 2),h as (select h.chain, sum(h.supply_tokens * p.price_usd) supply_usd, sum(h.holders) positions from hold_all h left join p on p.ticker=h.ticker and p.chain=h.chain group by 1)select d.chain, d.vol as dex_volume_usd, d.trades as dex_trades, d.tickers as active_tickers, x.transfer_usd as transfer_volume_usd, x.net_minted_30d_usd, h.supply_usd as net_minted_supply_usd, h.positions as holder_positionsfrom d left join x on x.chain=d.chain left join h on h.chain=d.chain order by d.vol desc