SELECT
DATE_TRUNC('week', block_timestamp) AS date,
INITCAP(chain) AS blockchain,
SUM(transaction_fees_usd / swap_count) AS fees_usd
FROM
crosschain.dex.trades_evm
WHERE
block_timestamp >= CURRENT_TIMESTAMP() - INTERVAL '12 months'
GROUP BY
ALL
ORDER BY
1 DESC
LIMIT
20000
2024-08-26T00:00:00
Polygon
2024-08-26T00:00:00
Arbitrum