with acquired_users as (
select distinct from_address as user
from polygon.core.fact_transactions
where block_timestamp::date >='2023-01-01'
and block_timestamp::date < '2024-01-01'
and nonce=1
)
select
platform_name,
count(distinct buyer_address) as buyers,
count(distinct seller_address) as sellers,
count(distinct tx_hash) as transactions
from polygon.nft.ez_nft_sales
where origin_from_address in (select user from acquired_users)
and block_timestamp::date >='2023-01-01'
and block_timestamp::date < '2024-01-01'
group by 1
order by 2 desc, 3 desc
limit 5