Query editor
-- [CA] P0-8b — DEX volume, DAILY, 2024-01-01…now (Ethereum) -> H18-- Same aggregation as M1 (SUM(amount_usd), trades, traders) but over the FULL-- train+holdout window, which H18 needs (N>=24 episodes).---- ⚠️ SCOPE / COST DECISION (2026-09-15):-- A 20-month scan of dex.trades across all 8 chains is NOT affordable. The-- measured rate is ~0.111 credits per chain-day for a window-function query-- (WASH, 8 chains x 30d = 26.661 cr), so 8 chains x 610 days extrapolates to-- ~540 cr - far above the sprint's >100 cr approval threshold.-- This query therefore runs ETHEREUM ONLY. It (a) produces a complete-- 610-day Ethereum DEX-volume series, which is the largest and most liquid-- venue, and (b) gives the exact credit cost of a *simple* dex.trades-- aggregation at this depth, so the 8-chain extension can be priced from a-- measurement instead of a guess. Extension to more chains is a Strategist-- decision (HANDOFF 2026-09-15).---- NOTE: unlike WASH this query has NO window functions - it is a plain-- GROUP BY, so its per-chain-day cost should be well BELOW the 0.111 figure.-- That is exactly what this run measures.SELECT date_trunc('day', block_time) AS day,blockchain,SUM(amount_usd) AS volume_usd,COUNT(*) AS trades,COUNT(DISTINCT tx_from) AS traders,CASE WHEN date_trunc('day', block_time) < DATE '2026-01-01'THEN 'train' ELSE 'holdout' END AS splitFROM dex.tradesWHERE blockchain = 'ethereum'AND block_month >= DATE '2024-01-01'AND block_time >= TIMESTAMP '2024-01-01 00:00:00'GROUP BY 1, 2ORDER BY 1 DESC