Moecompare 7
    Updated 2023-04-01
    (

    with base as (select
    distinct buyer

    from flow.core.ez_nft_sales
    where tx_succeeded = 'TRUE'
    and NFT_COLLECTION ilike '%DimensionX'
    group by 1


    )

    ,raw as (select

    buyer,
    count(distinct NFT_COLLECTION) as num_collections
    from flow.core.ez_nft_sales
    where buyer in (select buyer from base)
    group by 1)

    select
    case
    when num_collections = 1 then 'Only this collection'
    when num_collections = 2 then 'One Other collection'
    when num_collections = 2 then '2 Other collections'
    when num_collections = 3 then '3 Other collections'
    when num_collections > 3 then 'more then 3 Other collections'
    end as type,
    count(distinct buyer) as wallets,
    'DimensionX' as collection
    from raw
    group by 1)
    union all
    (

    Run a query to Download Data