Sbhn_NPUsers Distribution by Their Active Days copy
    Updated 2023-04-28
    -- forked from Users Distribution by Their Active Days @ https://flipsidecrypto.xyz/edit/queries/35fe0a91-3a2e-4fcc-a293-0de4cacb0252

    with base as (select sender,
    count(DISTINCT block_timestamp::date) as days
    from axelar.core.ez_squid
    where block_timestamp::date >= '2023-02-23'
    and
    destination_chain in (
    'agoric',
    'assetmantle',
    'comdex',
    'crescent',
    'evmos',
    'juno',
    'kujira',
    'osmosis',
    'secret',
    'stargaze',
    'terra2',
    'umee'
    )
    group by 1)

    select case when days =1 then '1 Days'
    when days=2 then '2 Days'
    when days=3 then '3 Days'
    when days=4 then '4 Days'
    when days>4 then 'More Than 4 Days'
    end as splitter,
    count(DISTINCT sender) as users
    from base
    group by 1


    Run a query to Download Data