with tab1 as (
SELECT
trader,
count(distinct tx_hash) as N_trades
from arbitrum.vertex.ez_perp_trades
group by 1
)
SELECT
case when N_trades <= 1 then 'A: 1 Trade'
when N_trades > 1 and N_trades <= 5 then 'B: 2-5 Trades'
when N_trades > 5 and N_trades <= 10 then 'C: 5-10 Trades'
when N_trades > 10 and N_trades <= 50 then 'D: 10-50 Trades'
when N_trades > 50 and N_trades <= 100 then 'E: 50-100 Trades'
when N_trades > 100 and N_trades <= 500 then 'F: 100-500 Trades'
else 'G: > 100 Trades'
end as Status,
count(distinct trader) as N_Traders
from tab1
group by 1