Query editor
witheth_prices as (SELECT priceFROM prices.usdWHERE symbol = 'ETH' AND contract_address IS NULLORDER BY minute DESCLIMIT 300),eth_price as (SELECT AVG(price) as price FROM eth_prices),all_trades as (SELECT * FROM query_2988077),protocol_stats AS (SELECT-- General StatsSUM(num_issued) AS total_issued,SUM(num_exercise) AS num_exercised_options,-- Volume numbers (ETH)SUM(premium_collected) AS total_premium,SUM(strike_traded) AS total_strike,SUM(realized_volume) AS total_volume,SUM(notional_volume) AS notional_volume,SUM(secondary_traded) AS secondary_volumeFROM all_trades)SELECTprice,ps.*,-- Volume numbers (USD)total_premium * price AS total_premium_usd,total_strike * price AS total_strike_usd,total_volume * price AS total_volume_usd,notional_volume * price AS notional_volume_usd,secondary_volume * price AS secondary_volume_usdFROM protocol_stats psLEFT JOIN eth_price ON true