Query editor
with daily_l2_fee as (select*,sum(l2_base_eth) over(order by block_date) total_l2_base_eth,sum(l2_surplus_eth) over(order by block_date) total_l2_surplus_ethfrom (selectblock_date,approx_percentile((gas_used * effective_gas_price) / 1e18, 0.5) median_gas_eth_per_tx,avg((gas_used * effective_gas_price) / 1e18) avg_gas_eth_per_tx,sum(((gas_used - gas_used_for_l1) * 1e8) / 1e18) l2_base_eth,sum(((gas_used - gas_used_for_l1) * (effective_gas_price - 1e8)) / 1e18) l2_surplus_ethfrom arbitrum.transactionswhere gas_used > 0 and block_number >= 70483338 and block_number < 191918583group by block_dateunion allselectblock_date,approx_percentile((gas_used * effective_gas_price) / 1e18, 0.5) median_gas_eth_per_tx,avg((gas_used * effective_gas_price) / 1e18) avg_gas_eth_per_tx,sum(((gas_used - gas_used_for_l1) * 1e7) / 1e18) l2_base_eth,sum(((gas_used - gas_used_for_l1) * (effective_gas_price - 1e7)) / 1e18) l2_surplus_ethfrom arbitrum.transactionswhere gas_used > 0 and block_number >= 191918583group by block_date)),daily_l1_surplus_fee as (select*,sum(l1_surplus_eth) over(order by block_date) total_l1_surplus_ethfrom (selectblock_date,sum(value) / 1e18 l1_surplus_ethfrom arbitrum.traceswhere "from" = 0xa4b00000000000000000000000000000000000f6and address = 0x2e041280627800801e90e9ac83532fadb6cad99a -- L1 Surplus Feeand value > 0and block_number >= 70483338 and block_number < 191918583and success = truegroup by block_dateunion allselectblock_date,sum(value) / 1e18 l1_surplus_ethfrom arbitrum.traceswhere "from" = 0xa4b00000000000000000000000000000000000f6and address = 0x2e041280627800801e90e9ac83532fadb6cad99a -- L1 Surplus Feeand block_number >= 191918583and success = truegroup by block_date