Sbhn_NPrate 2
    Updated 2023-03-01
    select 'Stable Rate' as type,
    count(DISTINCT tx_hash) as borrows,
    count(DISTINCT borrower_address) as users,
    sum(borrowed_usd) as volume_usd
    from ethereum.aave.ez_borrows
    where block_timestamp >= CURRENT_DATE - {{Date}}
    and borrow_rate_mode = 'Stable Rate'
    group by 1

    UNION ALL

    select 'Variable Rate' as type,
    count(DISTINCT tx_hash) as borrows,
    count(DISTINCT borrower_address) as users,
    sum(borrowed_usd) as volume_usd
    from ethereum.aave.ez_borrows
    where block_timestamp >= CURRENT_DATE - {{Date}}
    and borrow_rate_mode = 'Variable Rate'
    group by 1

    Run a query to Download Data