Hessish aavekashi - borrwers users totc 2
    Updated 2023-03-01
    with stbl as (select DISTINCT TOKEN_ADDRESS as x, SYMBOL as token0 , avg(price) as pr
    from ethereum.core.fact_hourly_token_prices
    where HOUR::date >= '2023-01-01'
    GROUP by 1,2
    having pr between '0.99'and '1.01') ,
    usersaave as
    (select DISTINCT DEPOSITOR_ADDRESS as wallets
    from ethereum.aave.ez_deposits join stbl on token0=SYMBOL
    where BLOCK_TIMESTAMP >= '2023-01-01') ,

    userscomp as
    (select DISTINCT SUPPLIER as wallet
    from ethereum.compound.ez_deposits
    join stbl on SUPPLIED_SYMBOL=TOKEN0
    WHERE BLOCK_TIMESTAMP::date >= '2023-01-01') ,


    usersaaveout as
    (select DISTINCT DEPOSITOR_ADDRESS as wallets
    from ethereum.aave.ez_deposits join stbl on token0=SYMBOL
    where BLOCK_TIMESTAMP >= '2023-01-01') ,

    userscompout as
    (select DISTINCT SUPPLIER as wallet
    from ethereum.compound.ez_deposits
    join stbl on SUPPLIED_SYMBOL=TOKEN0
    WHERE BLOCK_TIMESTAMP::date >= '2023-01-01')
    select DISTINCT SYMBOL , count(DISTINCT tx_hash ) as txs,count(DISTINCT wallets ) as users_stbl,sum(BORROWED_USD) as usd,
    Run a query to Download Data