0-MIDtotal satas
    Updated 2023-06-11
    with tab1 as (
    select
    DECODED_LOG:from as lender
    ,DECODED_LOG:to as borrower
    ,DECODED_LOG:amount as loan_amount
    ,TX_HASH
    from ethereum.core.ez_decoded_event_logs
    where ORIGIN_TO_ADDRESS='0x29469395eaf6f95920e59f858042f0e28d98a20b'
    and ORIGIN_FUNCTION_SIGNATURE='0xe263967e'
    and CONTRACT_ADDRESS='0x0000000000a39bb272e79075ade125fd351887ac')
    select
    count(distinct lender) as lenders
    ,count(distinct borrower) as borrowers
    ,sum(loan_amount/1e18) as loan_volume
    ,count(distinct TX_HASH) as loan_count
    from tab1


    Run a query to Download Data