with table_1 as (select distinct(trader) as swapper,
count(distinct(tx_id)) as swap_count
from terra.swaps
where block_timestamp >= current_date -30
--tx_id = 'B635F9845C52975B5E86FB97B952056F3CF1B242987DA306F35D9A82B46C45BD'
group by 1
having swap_count >= 3000
order by 2 desc)
--limit 20
select distinct(swap_pair),
count(distinct(tx_id )) as swap_count
from table_1 a
join terra.swaps b on a.swapper = b.trader
where block_timestamp >= current_date -30
group by 1
order by 2 desc
limit 1