SELECT
'Optimism' as network,
date_trunc('week', block_timestamp::date) as date,
count(distinct tx_hash) as Swaps_Count,
sum(amount_in_usd) as Total_Volume
FROM optimism.velodrome.ez_swaps
GROUP BY 1,2
UNION
select
'arbitrum' as network,
date_trunc('week', block_timestamp::date) as date,
count(distinct tx_hash) as Swaps_Count,
sum(amount_in_usd) as Total_Volume
from arbitrum.sushi.ez_swaps
group by 1,2