adambalaNFT avg
    Updated 2022-06-23
    --as M.r sam said in discord i used this query to find holders

    with
    holders as (
    SELECT
    nft_from_address as address,
    '-1' as flow
    FROM ethereum.core.ez_nft_transfers
    where nft_address in('0x5663e3e096f1743e77b8f71b5de0cf9dfd058523','0x3545192b340f50d77403dc0a64cf2b32f03d00a9','0x90B3832e2F2aDe2FE382a911805B6933C056D6ed')


    union all

    select
    nft_to_address as address,
    '1' as flow
    FROM ethereum.core.ez_nft_transfers
    where nft_address in('0x5663e3e096f1743e77b8f71b5de0cf9dfd058523','0x3545192b340f50d77403dc0a64cf2b32f03d00a9','0x90B3832e2F2aDe2FE382a911805B6933C056D6ed')
    ),
    total as ( select distinct address , sum(flow) AS COUNTS from holders group by address having 2 > 0
    )
    select avg(2) AS AVG_NFT_HOLD from total
    Run a query to Download Data