rajsAO New Users by # of Txs
    Updated 2022-09-06
    with new_users AS
    (
    SELECT
    from_address as new_users
    -- count(case when nonce > 0 then 1 end) as returning_users,
    -- count(*) as total_users,
    -- avg(case when nonce > 0 then nonce end) as avg_txs_by_returning_users
    -- avg(nonce) as avg_no_of_txs
    from arbitrum.core.fact_transactions
    where tx_hash IN
    (
    SELECT
    tx_hash
    from arbitrum.core.fact_event_logs
    where contract_address = '0xfae39ec09730ca0f14262a636d2d7c5539353752'
    and topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    and topics[1] = '0x0000000000000000000000000000000000000000000000000000000000000000'
    )
    and nonce = 0
    )

    select
    -- count(from_address) as airdrop_hunters
    case when total_no_of_txs = 1 then '1 tx'
    when total_no_of_txs > 1 and total_no_of_txs < 6 then '2-5 txs'
    when total_no_of_txs > 5 and total_no_of_txs < 11 then '6-10 txs'
    when total_no_of_txs > 10 and total_no_of_txs < 101 then '11-100 txs'
    else '>100 txs'
    end as txs_cat,
    count(from_address) as no_of_users
    FROM
    (
    SELECT
    from_address,
    count(*) as total_no_of_txs
    -- count(*) / count(distinct from_address) as avg_no_of_txs
    Run a query to Download Data