select block_timestamp::date as date,
platform,
count(DISTINCT tx_HASH) as txs,
count(DISTINCT origin_from_address) as traders,
sum(amount_in_usd) as usd_volume
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,2