Query editor
WITH recent_volume AS (SELECTproject,SUM(amount_usd) AS volume_30dFROM dex.tradesWHERE block_time >= date_add('day', -30, current_date)GROUP BY project),total_volume AS (SELECT SUM(volume_30d) AS total FROM recent_volume)SELECTr.project,r.volume_30d,r.volume_30d / t.total * 100 AS market_share_pctFROM recent_volume rCROSS JOIN total_volume tORDER BY r.volume_30d DESC