select
date_trunc('day',block_timestamp) as date,
platform as Dex,
count(tx_id) as Swaps,
sum(amount_usd) as Volume,
count(DISTINCT(pool_address)) as Pools
from ethereum.dex_swaps
where
date >= '2021-08-01' AND
amount_usd < 1000000000
-- AND platform != 'curve'
group by date, Dex
order by date