with ethereum as ( select min(block_timestamp) as date, origin_from_address
from ethereum.core.ez_dex_swaps
group by 2
)
,
solana as ( select min(block_timestamp) as date, SWAPPER
from solana.core.fact_swaps
group by 2
)
select 'Ethereum' as chain , date(date) as dt, count(DISTINCT(origin_from_address)) as total, sum(total) over (order by dt asc ) as cum_total
from ethereum
where date >= CURRENT_DATE - {{N_days}}
group by 1,2
UNION
select 'Solana' as chain , date(date) as dt, count(DISTINCT(SWAPPER)) as total, sum(total) over (order by dt asc ) as cum_total
from Solana
where date >= CURRENT_DATE - {{N_days}}
group by 1,2