select date_trunc('day', block_timestamp) as day,
case
when day >= '2022-09-01' then '2 Weeks Prior to The Merge'
else 'Other Days'
end as periods,
sum(withdrawn_tokens) as eth_amount,
sum(withdrawn_usd) as usd_amount
from ethereum.aave.ez_withdraws
where symbol = 'WETH'
and blockchain = 'ethereum'
and day >= '2022-06-01'
group by 1