-- What is the cumulative total of contracts launched on Osmosis?
with old_pools as (
SELECT distinct pool_ids[0]
FROM osmosis.core.fact_swaps
WHERE block_timestamp < '2022-05-01'
)
SELECT COUNT(distinct pool_ids[0]) as new_pools_count
FROM osmosis.core.fact_swaps
WHERE block_timestamp >= '2022-05-01' and pool_ids[0] not in (SELECT * FROM old_pools)