Query editor
WITH daily_fees AS (SELECTblock_date,SUM(CAST(gas_used AS decimal) * CAST((gas_price - priority_fee_per_gas) AS decimal)) AS total_base_fee,SUM(CAST(gas_used AS decimal) * CAST(priority_fee_per_gas AS decimal)) AS total_priority_feeFROMoptimism.transactionsWHEREsuccess = TRUEGROUP BYblock_date)SELECTblock_date,total_base_fee / 1e18 AS total_base_fee_in_eth,total_priority_fee / 1e18 AS total_priority_fee_in_ethFROMdaily_feesORDER BYblock_date DESC;