mansaPesky Penguins NFT Tier
    Updated 2022-07-18
    with table1 as(
    select
    count(distinct(a.block_id)) as n_NFT,
    purchaser,
    case
    when n_NFT <= 10 then 'Crab'
    when n_NFT <=100 and n_NFT > 10 then 'Shark'
    else 'Whale'
    end as Tier
    FROM solana.core.fact_nft_sales a
    inner join solana.core.dim_nft_metadata b
    on a.mint = b.mint
    WHERE b.TOKEN_NAME = 'Pesky Penguins'
    group by 2
    )

    select
    tier,
    sum(n_NFT),
    count(distinct(purchaser)) as n_buyers
    from table1
    group by 1
    Run a query to Download Data