MLDZMNOC15
    Updated 2022-10-08
    with tb1 as (select
    PROJECT_NAME as NFTs,
    count(tx_hash) as no_transaction,
    count(distinct BUYER_ADDRESS) as sender,
    sum(price_usd) as volume
    from ethereum.core.ez_nft_sales
    where PLATFORM_NAME='rarible'
    and NFTs is not null
    group by 1 having volume is not null
    order by 4 desc limit 10),
    tb2 as (select
    distinct BUYER_ADDRESS as sender,
    PROJECT_NAME as NFTs,
    count(tx_hash) as no_transaction

    from ethereum.core.ez_nft_sales
    where PLATFORM_NAME='rarible'
    and NFTs in (select NFTs from tb1)
    group by 1,2 having NFTs is not null

    )

    select
    NFTs,
    case
    when no_transaction=1 then 'One time users'
    when no_transaction>1 then 'More than 1 transaction'
    end as buckets,
    count(distinct sender) as count_users
    from tb2
    group by 1,2

    Run a query to Download Data