with adr as (select
ADDRESS
FROM flipside_prod_db.algorand.account
where ACCOUNT_CLOSED = 'FALSE' and balance > 1 ),
new_ad as (select
address
from
(select
*,
BLOCK_TIMESTAMP
from flipside_prod_db.algorand.block b , flipside_prod_db.algorand.account a
where b.BLOCK_ID = a.CREATED_AT
and BLOCK_TIMESTAMP ilike '2022-05%'
and ACCOUNT_CLOSED = 'FALSE' )
where
address in (select address from adr))
select
count( distinct SWAPPER ) as blc_plus_one_swappers
from flipside_prod_db.algorand.swaps
where SWAPPER in (select address from new_ad)