Query editor
-- [CA] COLLATERAL-C2 - daily USD prices of the 9 collateral tokens, 2024-01-01..now.-- Order: HANDOFF 2026-09-16 00:30, item 3 (collateral-price pull) - the bounce leg of-- H5/H6 plus the WETH leg of H18 (two birds, one pull).---- Grain: prices.day (the order's first choice; hourly is only a fallback for cascade-- days and is NOT needed here because H5/H6 work at daily granularity).---- ADDRESSES COME FROM DATA, never from memory: they are the top-1 contract per symbol-- in COLLATERAL-C1 (query 8731407, raw/2026-09-15/8731407.json), ranked by the-- number of days present in prices.day. Guard rail: the USDC/USDT picks must equal-- Q8's (8729213) canonical addresses - they do, so the ranking method is sound.-- Runner-up margin is huge for every symbol (e.g. USDT 989 vs 834, WBTC 989 vs 899),-- i.e. the canonical contract is not a close call.---- ⚠️ cbBTC coverage starts 2024-09-12 (its Ethereum launch) -> ~734/989 days = 74%.-- That is token lifetime, not missing data - reported, not silently filled.---- Cost: prices.day is ~24x smaller than prices.hour; the discovery run over the same-- window cost 0.088 cr, so this is expected to stay well inside the 3 cr cap.SELECT DISTINCTp."timestamp" AS day,p.symbol AS symbol,p.contract_address AS contract_address,p.price AS price_usd,CASE WHEN p."timestamp" < TIMESTAMP '2026-01-01'THEN 'train' ELSE 'holdout' END AS splitFROM prices.day pWHERE p.blockchain = 'ethereum'AND p."timestamp" >= TIMESTAMP '2024-01-01 00:00:00'AND p.symbol IN ('WETH', 'wstETH', 'WBTC', 'cbBTC', 'USDC', 'LINK', 'weETH', 'rETH', 'USDT')AND p.contract_address IN (-- WETHfrom_hex('c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),-- wstETHfrom_hex('7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0'),-- WBTCfrom_hex('2260fac5e5542a773aa44fbcfedf7c193bc2c599'),-- cbBTCfrom_hex('cbb7c0000ab88b473b1f5afd9ef808440eed33bf'),-- USDCfrom_hex('a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'),-- LINKfrom_hex('514910771af9ca656af840dff83e8264ecf986ca'),-- weETHfrom_hex('cd5fe23c85820f7b72d0926fc9b05b43e359b7ee'),-- rETHfrom_hex('ae78736cd615f374d3085123a210448e74fc6393'),-- USDTfrom_hex('dac17f958d2ee523a2206206994597c13d831ec7'))ORDER BY 1 DESC, 2