select
DISTINCT ORIGIN_TO_ADDRESS as user,
count(a.tx_hash) as tx_count,
sum(matic_value) as volume
from polygon.core.fact_event_logs a join polygon.core.fact_transactions b on a.tx_hash = b.tx_hash
where event_name = 'Transfer'
and event_inputs:tokenId is not null
and event_inputs:from = '0x0000000000000000000000000000000000000000'
and tx_status = 'SUCCESS'
and a.block_timestamp >= '2022-01-01'
and matic_value > 0
group by 1
order by 3 desc
limit 10