with base as (select
origin_from_address,
count(DISTINCT tx_hash) as txs
from avalanche.core.ez_dex_swaps
where platform = 'gmx'
and block_timestamp::date >= '{{Date}}'
group by 1)
select case when txs=1 then '1 Swap'
when txs>1 and txs<=5 then '1 - 5 Swaps'
when txs>5 and txs<=10 then '5 - 10 Swaps'
when txs>10 then 'More Than 10 Swaps'
end as splitter,
count(DISTINCT origin_from_address) as users
from base
group by 1