select origin_from_address,
count(DISTINCT tx_HASH) as txs,
sum(amount_in_usd) as usd_volume,
count(DISTINCT block_timestamp::date) as active_days
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
having usd_volume is not null
order by 3 DESC
limit 100