MLDZMNNDA14
    Updated 2023-01-24
    with t1 as (select
    author as users,
    count(*) as no_txn

    FROM near.beta.github_activity
    group by 1)

    SELECT
    case
    when no_txn=1 then 'a. Just 1 time'
    when no_txn>1 and no_txn<=5 then 'b. 2-5 times'
    when no_txn>5 and no_txn<=20 then 'c. 5-20 times'
    when no_txn>20 then 'd. Over 20 times'
    end as gp,
    count(distinct users) as no_users
    from t1
    group by 1
    Run a query to Download Data