select
blockchain,
count(distinct tx_hash) as number_of_collateral,
sum(amount_usd) as amount_of_borrowing,
count(distinct origin_from_address) as number_of_wallet
from crosschain.ez_borrowing
where collateral_symbol in ('USDC', 'USDT', 'DAI', 'TUSD', 'sUSD', 'UST', 'USDN')
and lending_pool ilike 'km%'
and action = 'Borrow'
group by blockchain