with w as (select sum(balance) as balance_amount, address from algorand.account
where balance > 0
group by address
having balance_amount > 50000)
select count(distinct swapper),SWAP_PROGRAM from algorand.swaps
where block_timestamp::date >= '2022-04-01' and swapper in (select address from w) and SWAP_PROGRAM in( 'tinyman','algofi','pactfi')
group by 2