Query editor
-- 1. CTE to get the latest USD price for WETH (Ethereum's native asset equivalent)WITH latest_price AS (SELECTprice AS latest_eth_usd_priceFROMprices.latest pWHERE-- WETH address on Ethereump.contract_address = 0xC02aaA39b223FE8D0A0e5c4F27eAd9083c756Cc2AND p.blockchain = 'ethereum'-- Limit 1 is a safeguard, though prices.latest should have only one per token/chainLIMIT 1),-- 2. CTE to calculate the total ETH deposited (from your original query)total_eth AS (SELECTSUM(CAST(value AS DOUBLE)) / 1e18 AS total_eth_depositedFROMethereum.traces tWHERE-- Condition for Deposits (transaction TO the bridge address)t."to" = 0x49048044D57e1C92A77f79988d21Fa8fAF74E97eAND successAND (call_type NOT IN ('delegatecall', 'callcode', 'staticcall') OR call_type IS NULL))-- 3. Final SELECT statement to combine the resultsSELECT'Total ETH Deposited (USD at Latest Price)' AS metric,-- Multiply the total ETH by the latest USD pricet.total_eth_deposited * p.latest_eth_usd_price AS total_usd_deposited_lifetimeFROMtotal_eth tCROSS JOINlatest_price p