Abbas_ra21arb origin: Senders Activity 2
    Updated 2023-06-05
    with
    tb AS (
    select
    BLOCK_TIMESTAMP,
    TX_HASH,
    AMOUNT,
    sender AS Senders
    from
    axelar.core.ez_satellite
    where SOURCE_CHAIN='arbitrum' and TOKEN_SYMBOL='ARB'
    ),
    tb4 AS (
    select
    FROM_ADDRESS AS User,
    Count(*) AS TX
    from
    arbitrum.core.fact_transactions
    where
    from_address in (
    select
    Senders
    from
    tb
    )
    group by
    1
    )
    select
    date_trunc('day', BLOCK_TIMESTAMP) AS Day,
    case
    when TX < 5 then 'less than 5 TX'
    when TX >= 5
    and TX < 25 then 'between 5 and 25 TX'
    when TX >= 25
    and TX < 100 then 'between 25 and 100 TX'
    when TX >= 100 then 'more than 100 TX'