with new_wallets as
(
select
address,
date_trunc('day', block_timestamp) as date,
balance
from algorand.account a
left join algorand.block b
on a.created_at = b.block_id
where block_timestamp >= '2022-05-04'
and block_timestamp <= '2022-05-10'
)
SELECT
count(distinct address)
from algorand.account_asset
where address in
(
SELECT
address
from new_wallets
)