with pools as (select
distinct pool_ids,
min(block_timestamp::date) as date
from osmosis.core.fact_swaps
where tx_status = 'SUCCEEDED'
and block_timestamp >= '2022-05-01'
and from_amount > 0
group by 1)
select
date,
count(distinct pool_ids) as number_of_pools,
sum(number_of_pools) over(order by date) as total_pools
from pools
group by 1