MLDZMNborrow8
    Updated 2023-03-09
    select
    case
    when BORROWED_USD>0 and BORROWED_USD<=100 then 'a. < 100 USD'
    when BORROWED_USD>100 and BORROWED_USD<=1000 then 'b. 100-1,000 USD'
    when BORROWED_USD>1000 and BORROWED_USD<=5000 then 'c. 1,000-5,000 USD'
    when BORROWED_USD>5000 and BORROWED_USD<=10000 then 'd. 5,000-10,000 USD'
    when BORROWED_USD>10000 and BORROWED_USD<=20000 then 'e. 10,000-20,000 USD'
    when BORROWED_USD>20000 then 'e. > 20,000 USD'
    end as bucket,
    count(distinct tx_hash) as sale_no,
    count(distinct BORROWER_ADDRESS) as wallets
    from ethereum.aave.ez_borrows
    where AAVE_VERSION='Aave V2'
    and SYMBOL in ('UNI')
    group by 1 having bucket is not null
    Run a query to Download Data