rajs# of Users by Tx Type
    Updated 2022-09-14
    SELECT
    tx_type,
    case when tx_type = 1 then 'Buy Only'
    when tx_type = 2 then 'Sell Only'
    when tx_type = 3 then 'Both Buy and Sell'
    end as tx,
    count(user) as no_of_users
    FROM
    (
    SELECT
    user,
    sum(identifier) as tx_type,
    sum(no_of_txs) as no_of_txs
    from
    (
    SELECT
    buyer as user,
    1 as identifier,
    count(*) as no_of_txs
    from flow.core.ez_nft_sales
    where nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
    group by 1

    UNION

    SELECT
    seller as user,
    2 as identifier,
    count(*) as no_of_txs
    from flow.core.ez_nft_sales
    where nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
    group by 1
    )
    group by 1
    order by 3 desc
    )
    Run a query to Download Data