Query editor
-- [CA] COLLATERAL-C1 — discovery of collateral token addresses FROM DATA.---- Order of the Strategist (HANDOFF 2026-09-16 00:30, item 3): daily prices for-- WETH / wstETH / WBTC / cbBTC / USDC / LINK / weETH / rETH / USDT, 2024-01-01..now,-- with the explicit rule "addresses come ONLY from data, never hand-written".---- ⚠️ DEVIATION (reported in HANDOFF): the order pointed at the Aave view-- (`debt_token_address` / `collateral_token_address`) "in the Q-L raw". Those-- columns are NOT in raw/2026-09-15/8729701.json — the Q-L query aggregated by-- `debt_addr` but projected only the SYMBOL columns, so the addresses were-- dropped before the raw dump. Re-scanning the Aave view just to recover them-- would cost ~2.8 cr (the Q-L scan price), i.e. the entire cap for this task.-- So discovery runs on `prices.day` instead — the SAME data-derived method the-- project already accepted in Q8 (8729213), which picked canonical contracts by-- behaviour in the price series rather than by a hand-written list.---- Method: for each symbol, group the ethereum daily price series by-- contract_address and rank by the number of days the contract has a price.-- The contract with the most days is the canonical one (an impostor token has a-- short, sparse series). Runner-ups are returned too, so the choice is auditable-- and the USDC/USDT picks can be cross-checked against Q8's canonical set.---- Cost: prices.day is ~24x smaller than prices.hour (R1c = 0.127 cr for the whole-- 20-month ethereum scan), so this discovery is expected to be a few hundredths-- of a credit. Result is small (a handful of rows per symbol).SELECT symbol,contract_address,COUNT(*) AS days_present,MIN("timestamp") AS first_day,MAX("timestamp") AS last_day,ROUND(MIN(price), 8) AS min_price,ROUND(MAX(price), 8) AS max_price,ROUND(APPROX_PERCENTILE(price, 0.5), 8) AS median_priceFROM prices.dayWHERE blockchain = 'ethereum'AND "timestamp" >= TIMESTAMP '2024-01-01 00:00:00'AND symbol IN ('WETH', 'wstETH', 'WBTC', 'cbBTC', 'USDC', 'LINK','weETH', 'rETH', 'USDT')GROUP BY 1, 2ORDER BY 1, days_present DESC