select count(*) as total, tx_type from (
select block_timestamp, block_id, 'Borrow' as tx_type, tx_id, borrower_address, blockchain, symbol, borrowed_usd
from flipside_prod_db.aave.borrows
where borrower_address like lower('{{user_address}}'))
group by tx_type