NavidCopy of Untitled Query
    Updated 2022-10-23
    with sells as (
    select
    block_timestamp,
    concat(NFT_COLLECTION, '-', NFT_ID) as tokenid,
    BUYER,
    lead(BUYER) over (partition by NFT_COLLECTION, NFT_ID order by block_timestamp asc) as next_buyer
    from
    flow.core.ez_nft_sales
    where
    NFT_COLLECTION like '%RaceDay%'
    order by
    block_timestamp asc
    ), last_buyers as (
    select
    *
    from
    sells
    where next_buyer is null
    ), buyers_asset as (
    select
    BUYER,
    count(*) as number_of_current_tokens
    from
    last_buyers
    group by
    buyer
    )
    select
    number_of_current_tokens,
    count(*) as cnt
    from buyers_asset
    group by number_of_current_tokens
    order by number_of_current_tokens asc
    Run a query to Download Data