mcfemi6Untitled Query
    Updated 2022-10-25

    Select
    Count(DISTINCT BORROWER_ADDRESS) AS TOTAL_BORROWER,
    BORROWER_ADDRESS,
    sum(BORROWED_USD),

    Count(DISTINCT DEPOSITOR_ADDRESS) AS TOTAL_DEPOSITOR,
    sum(SUPPLIED_USD),
    DEPOSITOR_ADDRESS
    FROM ethereum.aave.ez_borrows Borrow
    JOIN ethereum.aave.ez_deposits Deposit
    ON Borrow.borrower_address= deposit.depositor_address
    WHERE borrow.AAVE_VERSION ='Aave V2' AND deposit.AAVE_VERSION = 'Aave V2'
    GROUP BY 2
    ORDER BY 2 DESC;

    Run a query to Download Data