jb1992Top 6 Holders With Most Number of Held NFTs
    Updated 2022-10-22
    with table1 as (
    select block_timestamp::date as date,
    tx_id,
    buyer,
    nft_collection,
    nft_id,
    row_number() over (partition by nft_id order by date desc) rn
    from flow.core.ez_nft_sales
    where nft_collection = 'A.329feb3ab062d289.RaceDay_NFT'
    and tx_succeeded = 'TRUE'),

    table2 as (select * from table1 where rn = 1 order by date desc)

    select buyer as Holder,
    count (nft_id) as NFTS_Count
    from table2
    group by 1
    order by 2 desc
    limit 6
    Run a query to Download Data