Query editor
-- [v2] Core v2 KPIs — ONE row, one column per headline metric.-- DEPENDS ON: query_8291505 (base_v2_tvl_daily)---- WHY ONE ROW, MANY COLUMNS: each counter viz reads this at rowNumber = 1 and picks its metric by-- counterColName, so there is NO positional coupling. Contrast query_4627837, where three counters-- read result rows 1/2/3 by ordinal — inserting a row there silently repoints all three with no error.-- ⇒ ADD NEW METRICS AS NEW COLUMNS. NEVER AS NEW ROWS.---- As-of day is CURRENT_DATE - 1, matching query_4921564 on the v1 side, so v1 and v2 figures on this-- dashboard are read as of the same date and the eventual combined total does not mix as-of dates.---- unpriced_vaults is a guard rail, not a display metric: it counts vaults holding collateral that-- priced to NULL. If it is ever > 0, tvl_usd is silently understating and the fix belongs in-- query_4682063's proxy/override map.SELECTSUM(TVL_usd) AS tvl_usd,COUNT(DISTINCT CASE WHEN TVL_usd > 0 THEN vault END) AS funded_vaults,COUNT(DISTINCT CASE WHEN TVL_usd > 0 THEN collateral_address END) AS collateral_assets,SUM(CASE WHEN price_missing THEN 1 ELSE 0 END) AS unpriced_vaultsFROM query_8291505 /* base_v2_tvl_daily */WHERE dt = CURRENT_DATE - INTERVAL '1' day