with nft as ( select date(block_timestamp) as date, origin_from_address, count(DISTINCT(tx_hash)) as total_tx,
count(DISTINCT(contract_address)) as collection , count(DISTINCT(EVENT_INPUTS:tokenId)) as nft
from ethereum.core.fact_event_logs
where origin_to_address = lower('0x5a7749f83b81b301cab5f48eb8516b986daef23d') and
origin_to_address = EVENT_INPUTS:to and origin_from_address = EVENT_INPUTS:from
group by 1,2)
select avg(total_tx) as avg_tx
from nft