Query editor
-- https://dune.com/queries/8452994 | PropAMM — share of chain DEX volume-- Prop AMM volume as a share of ALL DEX volume on each chain, monthly.WITH a AS (SELECT blockchain, project, block_month, amount_usdFROM dex.tradesWHERE blockchain IN ('ethereum','bnb','base','arbitrum','optimism','polygon')AND block_month >= date '2025-01-01'AND block_month < date_trunc('month', current_date)AND amount_usd BETWEEN 0 AND 1e10UNION ALLSELECT blockchain, project, block_month, amount_usdFROM dex_solana.tradesWHERE block_month >= date '2025-01-01'AND block_month < date_trunc('month', current_date)AND amount_usd BETWEEN 0 AND 1e10)SELECT block_month AS month,blockchain AS chain,sum(amount_usd) FILTER (WHERE project IN ('dodo','woofi','tessera_v','elfomofi','bisonfi','solfi','zerofi','tessera','goonfi','aquifer','alphaq','scorch','humidifi','obric','whalestreet')) AS propamm_volume_usd,sum(amount_usd) AS chain_dex_volume_usd,sum(amount_usd) FILTER (WHERE project IN ('dodo','woofi','tessera_v','elfomofi','bisonfi','solfi','zerofi','tessera','goonfi','aquifer','alphaq','scorch','humidifi','obric','whalestreet')) / nullif(sum(amount_usd), 0) AS propamm_shareFROM aGROUP BY 1, 2HAVING sum(amount_usd) FILTER (WHERE project IN ('dodo','woofi','tessera_v','elfomofi','bisonfi','solfi','zerofi','tessera','goonfi','aquifer','alphaq','scorch','humidifi','obric','whalestreet')) > 0ORDER BY 1, 5 DESC