with single_chain as (
select
dynamic_id,
COUNT(DISTINCT CHAIN) AS chain_count
from BI_ANALYTICS.BRONZE_API.DYNAMIC_API
where environment_id = 'c6ef9d8c-6b8d-441a-9f67-72b728cef538' --Flowscored environment
and wallet_type not in ('blocto', 'lilico')
and chain in ('FLOW', 'EVM')
and last_visit::DATE >= '2023-08-17'
group by 1
having chain_count = 1
)
select
count(distinct wallet_address) as wallet_count
from bi_analytics.bronze_api.dynamic_api
where dynamic_id in (select dynamic_id from single_chain)
and wallet_type = 'dapper'