select case when block_number >= 15537393 then 'After Merge' else 'Before Merge' end as type, date_trunc('day', block_timestamp) as date,
count(distinct tx_hash) as swap_count, count(distinct origin_from_address) as unique_swapper, sum(amount_in_usd) as swaps_volume
from ethereum.core.ez_dex_swaps
where date >= '2022-09-01' and date < current_date and amount_in_usd <= 10000000
group by 1, 2