select
platform,
pool_name,
count(distinct tx_id) as txs,
count(distinct
case when direction='OUT' then to_address else from_address end
) as users,
sum(amount_usd) as vol
from ethereum.dex_swaps
where token_address = lower('0x2d94AA3e47d9D5024503Ca8491fcE9A2fB4DA198')
group by 1,2
limit 100