with optimism_uniswap as (
select
block_timestamp::date as "Days",
'Uniswap' as "Platform",
count (distinct tx_hash) as "Number of Swaps",
count (distinct Origin_from_address) as "Number of Swappers"
from optimism.core.fact_event_logs
where origin_to_address in ('0xe592427a0aece92de3edee1f18e0157c05861564','0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45')
and event_name = 'Swap'
and tx_status = 'SUCCESS'
group by "Days"
order by "Days"
),
optimism_sushiswap as (
select
block_timestamp::date as "Days",
'Sushiswap' as "Platform",
count (distinct tx_hash) as "Number of Swaps",
count (distinct Origin_from_address) as "Number of Swappers"
from optimism.sushi.ez_swaps
where platform = 'sushiswap'
group by "Days"
order by "Days"
)
select * from optimism_uniswap
union all
select * from optimism_sushiswap