Query editor
WITH gas_fee AS (WITH gas_fees_per_day as (selectdate_trunc('day', block_time) as block_timestamp,count(*) as transaction_count,avg(gas_used) as gas_avg,sum(gas_used) as gas_sum,avg(gas_price_gwei) as gas_price_avg,avg(gas_price_usd) as gas_price_avg_usd,sum(tx_fee_native) as transaction_fee_sum,sum(tx_fee_usd) as transaction_fee_sum_usd,avg(tx_fee_native) as transaction_fee_avg,avg(tx_fee_usd) as transaction_fee_avg_usdFROM gas.feesWHERE (tx_receiver = 0x06450dee7fd2fb8e39061434babcfc05599a6fb8 or tx_receiver = 0x06450dee7fd2fb8e39061434babcfc05599a6fb8)GROUP BY date_trunc('day', block_time))-- Add cumulative transaction feesselect*,sum(transaction_fee_sum) over (order by block_timestamp rows unbounded preceding) as transaction_fee_sum_cumulative,sum(transaction_fee_sum_usd) over (order by block_timestamp rows unbounded preceding) as transaction_fee_sum_usd_cumulativeFROM gas_fees_per_dayWHERE block_timestamp >= from_iso8601_timestamp('2022-10-06')ORDER BY block_timestamp DESC)SELECT *,(select 'eth') as currency,(select 'mainnet') as network,(select 'xen') as contractFROM gas_feeWHERE block_timestamp >= date_trunc('day', now() - interval '7' day)