SELECT
DATE_TRUNC('week', block_timestamp) AS date,
INITCAP(chain) AS blockchain,
SUM(usd_amount) AS usd_volume
FROM
crosschain.dex.trades
WHERE
1 = 1
AND block_timestamp >= CURRENT_TIMESTAMP() - INTERVAL '12 month'
GROUP BY
ALL
ORDER BY
1,
usd_volume DESC
LIMIT
20000
2023-08-21T00:00:00
Ethereum
2023-08-21T00:00:00
Arbitrum
2023-08-21T00:00:00
Polygon