Sbhn_NPunwilling-rose
    Updated 2024-10-16
    with base as (select
    DISTINCT origin_from_address,
    sum(coalesce(amount_in_usd,amount_out_usd)) as usd
    from kaia.defi.ez_dex_swaps
    where platform = 'kaiaswap'
    and block_timestamp::date >= current_date-30
    group by 1
    having usd>0)

    select case when usd<100 then 'Less Than 100$'
    when usd>=100 and usd<1000 then '100$ - 1000$'
    when usd>=1000 and usd<10000 then '1000$ - 10000$'
    else 'More Than 10000$' end as splitter,
    count(DISTINCT origin_from_address) as users
    from base
    group by 1
    QueryRunArchived: QueryRun has been archived