adambalaApetimism 11
    Updated 2022-09-02
    with a as
    (select seller_address ,count(distinct tx_hash) as tx
    FROM optimism.core.ez_nft_sales
    where platform_name = 'quixotic' and EVENT_TYPE = 'sale' and CURRENCY_SYMBOL = 'ETH' and NFT_ADDRESS='0x51e5426ede4e2d4c2586371372313b5782387222'
    group by 1)

    select
    count(distinct seller_address) as users,
    case
    when tx = 1 then '1'
    when tx = 2 then '2'
    when tx = 3 then '3'
    when tx = 4 then '4'
    when tx = 5 then '5'
    when tx between 5 and 10 then '5 - 10'
    when tx between 10 and 15 then '10 - 15'
    when tx > 15 then 'more than 15 '
    end as "number of transactions for buyers"
    from a
    group by 2
    Run a query to Download Data