Select
Count(DISTINCT BORROWER_ADDRESS) AS TOTAL_BORROWER,
Count(DISTINCT DEPOSITOR_ADDRESS) AS TOTAL_DEPOSITOR
FROM ethereum.aave.ez_borrows Borrow
JOIN ethereum.aave.ez_deposits Deposit
ON borrow.borrower_address = deposit.depositor_address
WHERE deposit.aave_version != 'Aave V1' AND Borrow.aave_version = 'Aave V2'