MLDZMNab12
    Updated 2023-09-14
    with tb1 as (select
    distinct BUYER_ADDRESS as sender,
    PROJECT_NAME as NFT
    from ethereum.core.ez_nft_sales
    where price_usd is not NULL
    and CREATOR_FEE_USD is not null
    and PROJECT_NAME='art blocks'
    ),

    tb2 as (select
    'Only buy art blocks' as gp,
    count(distinct BUYER_ADDRESS) as no_users
    from ethereum.core.ez_nft_sales
    where price_usd is not NULL
    and CREATOR_FEE_USD is not null
    and PROJECT_NAME='art blocks'
    and BUYER_ADDRESS not in (select
    BUYER_ADDRESS
    from ethereum.core.ez_nft_sales
    where PROJECT_NAME!='art blocks')
    ),

    tb3 as (select
    PROJECT_NAME as gp,
    count(distinct BUYER_ADDRESS) as no_users
    from ethereum.core.ez_nft_sales
    where price_usd is not NULL
    and CREATOR_FEE_USD is not null
    and BUYER_ADDRESS in (select sender from tb1)
    and PROJECT_NAME!='art blocks'
    group by 1 having PROJECT_NAME is not null
    order by 2 desc limit 10
    )
    select * from tb2
    union all
    select * from tb3
    Run a query to Download Data