Query editor
WITH recent_prices AS (SELECTtimestamp,priceFROM prices.hourWHEREblockchain = 'arbitrum' AND timestamp >= CURRENT_TIMESTAMP - INTERVAL '1' DAY)SELECTCOUNT(t.hash) AS total_transactions,SUM(t.gas_used) AS total_gas_used,SUM((t.gas_used * t.effective_gas_price) / 1e18) AS total_fee_eth,SUM((t.gas_used * t.priority_fee_per_gas) / 1e18) AS total_priority_fee_eth,SUM(((t.gas_used * t.effective_gas_price) / 1e18) * p.price) AS total_fee_usd,SUM(((t.gas_used * t.priority_fee_per_gas) / 1e18) * p.price) AS total_priority_fee_usdFROM arbitrum.transactions AS tJOIN recent_prices AS pON t.block_time >= p.timestamp AND t.block_time < p.timestamp + INTERVAL '1' HOURWHEREt.block_time >= CURRENT_TIMESTAMP - INTERVAL '1' DAYAND t.success = TRUE /* Filter only successful transactions for accurate gas usage */AND t.block_number >= (SELECTMAX(block_number) - 7200FROM arbitrum.transactions)