with new_pools as (select
min(block_timestamp::date) as daily, a.value as new_pool
from osmosis.core.fact_swaps b , lateral flatten(input => b.pool_ids) a group by 2 )
select daily, count(distinct new_pool) as new_daily_pool, sum(new_daily_pool) over (order by daily) as cum_new_pool
from new_pools
where daily >= '2022-05-01' group by daily