RayyykOP Early Optimists NFT 4
    Updated 2022-10-27
    with table_1 as (select buyer_address,
    count(distinct(tx_hash)) as purchase_count
    from optimism.core.ez_nft_sales
    where event_type = 'sale'
    and nft_address = '0x0110bb5739a6f82eafc748418e572fc67d854a0f'
    and price_usd > 0
    and price_usd < 999999999
    group by 1)

    select case
    when purchase_count = 1 then 'Purchased Once'
    when purchase_count > 1 and purchase_count <= 5 then 'Purchased 2 to 5'
    when purchase_count > 5 and purchase_count <= 10 then 'Purchased 6 to 10'
    else 'More than 10 Purchases'
    end as purchases,
    count(distinct(buyer_address)) as wallet_count,
    (select avg(purchase_count) from table_1) as avg_purchase_count
    from table_1
    group by 1
    Run a query to Download Data