HerotatLenders
    Updated 2022-08-15
    with
    borrowers as
    (select date_trunc('week', BLOCK_TIMESTAMP) as dates, count(distinct borrower) as user, borrower_is_a_contract as is_regular_user, action, blockchain
    from FLIPSIDE_PROD_DB.CROSSCHAIN.EZ_borrowing
    group by 1, 3,4,5
    order by 1, 3,4,5),

    lenders as
    (select date_trunc('week', BLOCK_TIMESTAMP) as dates, count(distinct depositor) as user, lender_is_a_contract as is_regular_user, action, blockchain
    from FLIPSIDE_PROD_DB.CROSSCHAIN.EZ_LENDING
    group by 1, 3,4,5
    order by 1, 3,4,5)

    select * from borrowers
    union ALL
    select * from lenders
    Run a query to Download Data