sarath solend demographics 55
    Updated 2022-08-04
    with data1 as (SELECT
    date(block_timestamp) as days ,
    count(distinct tx_id) as tx_count,
    count(distinct INSTRUCTION:accounts[7]) as users,
    SUM( inner_instruction:instructions[1]:parsed:info:amount) / POWER(10, 6) AS usd_borrow_volume
    FROM
    solana.core.fact_events
    WHERE instruction:programId = 'So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo'
    AND instruction:accounts[0] = '3CdpSW5dxM7RTxBgxeyt8nnnjqoDbZe48tsBs9QUrmuN'
    AND instruction:accounts[2] = '8K9WC8xoh2rtQNY7iEGXtPvfbDCi563SdWhCAhuMP2xE'
    AND SUCCEEDED = TRUE
    AND BLOCK_TIMESTAMP ilike '2022%'
    GROUP BY 1)
    SELECT * from data1


    Run a query to Download Data