Query editor
withprice as (select date_trunc('day',minute) as day, avg(price) as pricefrom prices.usdwhere contract_address is nulland blockchain is nulland symbol = 'ETH'and date(minute)>=date(now()-interval '2' year)group by 1),fee_summary as (select date_trunc('day', block_time) as day,approx_percentile(cast(gas_price as double)*cast(gas_used as double)/1e18, 0.5) as median_gasfrom ethereum.transactionswhere date(block_time)>=date(now()-interval '2' year)group by 1)selecta.day,median_gas as med_gas_fee,median_gas*price as median_gasfrom fee_summary aleft join price bon a.day=b.day