with tx_list as (
select
distinct tx_group_id
from algorand.transactions
where asset_id in (0, 694432641)
and tx_type in ('axfer', 'pay')
and tx_type_name in ('asset transfer', 'payment')
and block_timestamp::date >= '2022-03-31'
)
select
count(distinct sender) as total_wallets
from algorand.transactions
where tx_group_id in (select * from tx_list)
and asset_id = 0
and tx_type = 'pay'
and tx_type_name = 'payment'