select
'Total Borrow' as type,
count(distinct(tx_hash)) as tx_num,
sum (borrowed_usd) as total_borrowed_usd
from ethereum.aave.ez_borrows
where aave_version ilike 'Aave V2'
union
select
'Total Deposit' as type,
count(distinct(tx_hash)) as tx_num,
sum (supplied_usd) as total_borrowed_usd
from ethereum.aave.ez_deposits
where aave_version ilike 'Aave V2'