Sbhn_NP2023-09-04 06:34 PM
    Updated 2023-09-04
    with base as (
    select origin_from_address as user,
    sum(amount_in_usd) as usd
    from avalanche.defi.ez_dex_swaps
    where block_timestamp::date>= current_date-30
    and platform in ('trader-joe-v1','trader-joe-v2')
    group by 1
    )
    select case when usd<=10 then 'Less Than 10 USD'
    when usd>10 and usd<=100 then '10 - 100 USD'
    when usd>100 and usd<=1000 then '100 - 1000 USD'
    else 'More Than 1000 USD' end as splitter,
    count(DISTINCT user) as users
    from base
    group by 1

    Run a query to Download Data