with
ogp as
(select date(block_timestamp) as date, avg(GAS_PRICE) as op_avg_gas_Price
from optimism.core.fact_transactions
group by 1 order by 1
),
egp as (select date(block_timestamp) as date, avg(GAS_PRICE) as eth_avg_gas_pirce
from ethereum.core.fact_transactions
group by 1 order by 1)
select ogp.date, op_avg_gas_Price, eth_avg_gas_pirce
from ogp inner join egp on ogp.date=egp.DATE