with
swap_tokens as (
select distinct token_out_contract as token_contract from near.core.ez_dex_swaps
union
select distinct token_in_contract as token_contract from near.core.ez_dex_swaps
)
select
count(distinct case when prices.token_contract is not null then swaps.token_contract end) as tokens_with,
count(distinct case when prices.token_contract is null then swaps.token_contract end) as tokens_without
from swap_tokens swaps
left join (select distinct token_contract from near.core.fact_prices) prices
on swaps.token_contract = prices.token_contract