Afonso_Diazaave-borrow-3
    Updated 2023-03-09
    with t as (
    select
    borrower_address as user,
    min(block_timestamp::date) as min_date
    from ethereum.aave.ez_borrows a
    join ethereum.core.fact_transactions b
    using(tx_hash)
    where aave_version = 'Aave V2'
    and symbol in ('SNX')
    group by 1
    ),

    t2 as (
    select
    borrower_address as user,
    min(block_timestamp::date) as min_date
    from ethereum.aave.ez_borrows a
    join ethereum.core.fact_transactions b
    using(tx_hash)
    where aave_version = 'Aave V2'
    and symbol in ('UNI')
    group by 1
    ),

    t3 as (
    select
    borrower_address as user,
    min(block_timestamp::date) as min_date
    from ethereum.aave.ez_borrows a
    join ethereum.core.fact_transactions b
    using(tx_hash)
    where aave_version = 'Aave V2'
    and symbol in ('MKR')
    group by 1
    ),

    Run a query to Download Data