select
date_trunc('day', block_timestamp) as date,
count(DISTINCT TX_HASH) as tx_count,
count(DISTINCT origin_from_address) as wallets,
sum(AMOUNT_IN_USD) as usd_vol,
case when date < '2022-09-15' then 'Pre' ELSE 'Post' END as split
from ethereum.core.ez_dex_swaps
where date >= '2022-07-01'
and AMOUNT_IN_USD < 100000000
group by date