Query editor
WITH daily AS (SELECTDATE_TRUNC('day', block_time) AS day,SUM(number_of_items) AS n_items,SUM(number_of_items * 0.0033) AS eth_daily, -- ★ multiply ★ by eth price per unit 0.0033 per nftSUM(number_of_items * 0.0033 * (3948)) AS usd_daily -- average usd value per ethFROM nft.mintsWHERE nft_contract_address = 0x3967cfe9c31b9f4346d45b64b19c3e6e91463ffbAND blockchain = 'base'GROUP BY 1)SELECTday,n_items,eth_daily,usd_daily,ROUND(eth_daily / n_items, 6) AS avg_price_eth, -- sanity‑checkSUM(eth_daily) OVER (ORDER BY day) AS eth_cumulative,SUM(usd_daily) OVER (ORDER BY day) AS usd_cumulativeFROM dailyORDER BY day;