SELECT
DATE_TRUNC('month', block_timestamp) AS date,
INITCAP(chain) AS blockchain,
SUM(
CASE
WHEN project = 'uniswap' THEN usd_amount
ELSE 0
END
) AS usd_volume_uniswap,
SUM(usd_amount) AS usd_volume,
ROUND(usd_volume_uniswap / usd_volume * 100, 2) AS uniswap_dominance_pct
FROM
crosschain.dex.trades_evm
WHERE
1 = 1
AND block_timestamp > '2021-04-01'
GROUP BY
ALL
ORDER BY
date DESC,
usd_volume DESC
LIMIT
500000
2024-10-01T00:00:00
Ethereum
2024-10-01T00:00:00
Arbitrum