mo115Hold - Free Claim
    Updated 2024-05-21
    with holders as (with first as (

    select
    ORIGIN_FROM_ADDRESS
    , DECODED_LOG:tokenId as TOKENID
    from ethereum.core.ez_decoded_event_logs
    where CONTRACT_ADDRESS = '0xcb0477d1af5b8b05795d89d59f4667b59eae9244'
    and CONTRACT_NAME ='Honey Comb'
    and DECODED_LOG:from = '0x0000000000000000000000000000000000000000'
    and (ORIGIN_FUNCTION_SIGNATURE='0x2260e6fe' or ORIGIN_FUNCTION_SIGNATURE='0x6a761202')

    )
    , last as (with list as(select PROJECT_NAME
    , TOKENID
    , BLOCK_TIMESTAMP
    , NFT_TO_ADDRESS
    , row_number() over (partition by TOKENID order by BLOCK_TIMESTAMP desc) as row_number
    from ethereum.nft.ez_nft_transfers
    where NFT_ADDRESS = lower ( '0xcb0477d1af5b8b05795d89d59f4667b59eae9244' )
    group by 1,2,3,4)select *
    from list
    where row_number = '1')

    select f.ORIGIN_FROM_ADDRESS ,f.TOKENID
    from first f inner join last l on f.ORIGIN_FROM_ADDRESS = l.NFT_TO_ADDRESS
    and f.TOKENID=l.TOKENID)
    select count (distinct ORIGIN_FROM_ADDRESS) as "Wallets"
    , count (distinct TOKENID) as "NFTs"
    FROM holders