select block_timestamp::Date as date,
case when date < '2023-02-13' then 'Before BUSD-PAX Issues'
else 'After BUSD-PAX Issues' end as timespan,
count (Distinct tx_hash) as TX_Count,
count (distinct borrower_address) as Users_Count,
sum (borrowed_tokens) as Total_Volume,
avg (borrowed_Tokens) as Average_Volume
from ethereum.aave.ez_borrows
where block_timestamp >= '2023-02-01'
and symbol = 'BUSD'
group by 1,2
order by 1