with gas_fee_curve as (SELECT date_trunc('week', d.block_timestamp) as week, avg(t.fee_usd) as gas_fee_curve
FROM ethereum.dex_swaps d
JOIN ethereum.transactions as t on d.tx_id = t.tx_id
WHERE platform = 'curve' and d.block_timestamp >= '2021-11-13' and pool_name = '0x0ce6a5ff5217e38315f87032cf90686c96627caa'
GROUP BY 1 ),
gas_fee_uni as (SELECT date_trunc('week', d.block_timestamp) as week, avg(t.fee_usd) as gas_fee_uni
FROM ethereum.dex_swaps d
JOIN ethereum.transactions as t on d.tx_id = t.tx_id
WHERE token_address = '0xdb25f211ab05b1c97d595516f45794528a807ad8' and platform = 'uniswap-v3' and d.block_timestamp >= '2021-11-13'
GROUP BY 1 )
SELECT c.gas_fee_curve, u.gas_fee_uni, u.week
FROM gas_fee_curve as c
JOIN gas_fee_uni as u on c.week = u.week